Display Records
Posted by admin - Apr 12, 2008 ADODB, Articles, Dani Vainstein, QTips 0 0 Views : 336 Receive Updates For This Category
Article Tools
- Print this page
- Add Comment
- Send to Friend
- Last Updated on :
Jul 16, 2011
The following example demonstrates how to display all records from a table. and loop thorough a record-set.
Dim oConn, oRst, oField
Dim sql
set oConn = CreateObject("ADODB.Connection")
oConn.Open "QT_Flight32"
set oRst = CreateObject("ADODB.recordset")
oRst.Open "Select * from Orders", oConn
Do Until oRst.EOF
For each oField in oRst.Fields
Print oField.Name & " = " & oField.Value
Next
Print String( 20, "-" )
oRst.MoveNext
loop
oRst.close
oConn.close


