I am trying to connect to a database(VB6 and Access 2000 and ADO) and return the results of a recordset to a data grid. My message box tells me that the connection has been established but I get an error stating that "The rowset is not bookmarkable". I am not sure what to do about it. Can anyone see an issue with my code below?
Private Sub Command2_Click()
Dim Cnxn2 As ADODB.Connection
Dim NewRs As ADODB.Recordset
' Open a connection using a DSN and ODBC tags
Set Cnxn2 = New ADODB.Connection
Cnxn2.ConnectionString = "Data Source='Passwords';" & _
Cnxn2.ConnectionTimeout = 30
If Cnxn2.State = adStateOpen Then
MsgBox "Cnxn2 state: YES "
Set NewRs = Cnxn2.Execute("Select * from Users")
Set DataGrid1.DataSource = NewRs
Set NewRs = Nothing
Set Cnxn2 = Nothing