Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Record Object

Status
Not open for further replies.

s2lai

Programmer
Oct 1, 2003
4
0
0
CA
In MSDN I find reference to a Record object, which is like a one row recordset. But I can't seem to reference this object. What I would like to do is to put the current row of a recordset into a Record object, and pass that record to a function instead of passing the entire recordset.

Thanks!
 
I don't know what you mean, but here's what I do:

Public cn As New ADODB.Connection
Public rs As ADODB.Recordset
Public CMD1 As String

Public Sub GetRecords()

CMD1 = "SELECT * FROM TABLE1"
Set rs = New ADODB.Recordset
rs.Open CMD1, cn

If Not rs.BOF Then
rs.MoveFirst
Do
' Do Stuff
rs.MoveNext
Loop Until rs.EOF
End If

Making the recordset global simplifies things.
 

You can use the Record object only with certain providers.
A normal database (Sql server, JET, etc) are not one of them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top