Article ID: 194607
Article Last Modified on 5/17/2007
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
cn.Open "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security " & _
"Info=False;Data Source=C:\Program Files\Microsoft Visual " & _
"Studio\VB98\Nwind.mdb"
'Uncomment the lines below, and comment the lines above,
'to test with Jet OLE DB 4.0,
'cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security " & _
'"Info=False;Data Source=C:\Program Files\Microsoft Visual " & _
'"Studio\VB98\Nwind.mdb"
'Or uncomment the below line to get the correct AbsolutePosition
'value rs.CursorLocation = adUseClient.
rs.Open "select * from employees", cn, adOpenKeyset
Debug.Print "There are " & rs.RecordCount & " records in employees"
Debug.Print "AbsolutePosition is " & rs.AbsolutePosition
Keywords: kbado210sp2fix kbbug kbdatabase kbinfo kbjet kbmdacnosweep KB194607