serious problem in accessing data in datagrid in vb 6.0
-
I am using the following code Dim con As ADODB.Connection Set con = New ADODB.Connection Set rs = New ADODB.Recordset con.Provider = "Microsoft.Jet.Oledb.4.0" con.Open "C:\Documents and Settings\Administrator\Desktop\Sandy\db2.mdb" rs.Open "select * from student", con Set dg1.DataSource = rs the error is The rowset is not bookmark:confused:
-
I am using the following code Dim con As ADODB.Connection Set con = New ADODB.Connection Set rs = New ADODB.Recordset con.Provider = "Microsoft.Jet.Oledb.4.0" con.Open "C:\Documents and Settings\Administrator\Desktop\Sandy\db2.mdb" rs.Open "select * from student", con Set dg1.DataSource = rs the error is The rowset is not bookmark:confused:
Reposting your question every 2 hours until someone gives you the answer you want, will only get you ignored... Dave Kreskowiak Microsoft MVP - Visual Basic
-
I am using the following code Dim con As ADODB.Connection Set con = New ADODB.Connection Set rs = New ADODB.Recordset con.Provider = "Microsoft.Jet.Oledb.4.0" con.Open "C:\Documents and Settings\Administrator\Desktop\Sandy\db2.mdb" rs.Open "select * from student", con Set dg1.DataSource = rs the error is The rowset is not bookmark:confused:
Try specifying the cursor location. Add this to your code:
Dim con As ADODB.Connection
Set con = New ADODB.Connection
Set rs = New ADODB.Recordset
con.Provider = "Microsoft.Jet.Oledb.4.0"
con.Open "C:\Documents and Settings\Administrator\Desktop\Sandy\db2.mdb"
rst.CursorLocation = adUseClient
rs.Open "select * from student", con
Set dg1.DataSource = rsIIRC, Access databases don't support server-side cursors... Dave Kreskowiak Microsoft MVP - Visual Basic -- modified at 11:58 Thursday 4th May, 2006