How to print Data Base Records from your VB Application Or Even from Data present in MSFlexgrid Control.
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 'Database - How to print Data Base Records from your VB Application Or Even from Data present in MSFlexgrid Control. 'Define myConn and myRec for Connection and RecordSet Private Sub Form_Load() Dim myConn As ADODB.Connection Dim myRec As ADODB.Recordset Set myConn = New ADODB.Connection Set myRec = New ADODB.Recordset myConn.Open "" 'Your Data base name myRec.Open 'Open Record Set While myRec.EOF <> True Printer.Print myRec.Fields(0), myRec.Fields(1) Printer.EndDoc myRec.MoveNext Wend End Sub |
Related posts:
- How to use ADO to load data into a FlexGrid control
- How to Use ADO to get data from a read-only Access database
- How to Read Image from Data Base which is stored in Binary format.
- How to Connect to a data source using ADO and retrieving the data.
- How to connect Oracle from VB
- How to use a INSERT INTO statement in ADO to copy data from one table into two existing tables
- How to Use ADO to page through records 10 at a time
- How to construct a Recordset of Contacts info from Outlook
- How to Use ADO to populate a ListBox with data values
- How to Use ADO to list database tables and their records in a TreeView