Hi, I'm having some problems binding a DataGrid control to a ADODB.RecordSet.
Here's my code:
Private Sub Form_Load()
Dim dbConnection As New ADODB.Connection
Set rsResults = New ADODB.Recordset
strQuery = "SELECT * FROM tblCategory INNER JOIN tblInventory ON tblCategory.categoryId = tblInventory.categoryId"
dbConnection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Documents and Settings\k\My Documents\CrystalTest2\inventory.mdb"
dbConnection.Open
Set rsResults = dbConnection.Execute(strQuery)
Set DataGrid1.DataSource = rsResults
DataGrid1.Refresh
End Sub
I keep on getting a "rowset is not bookmarkable" error
Have no idea why this is happening. You should be able to bind the DataGrid to a Recordset and have it automatically filled? Right?
Thanks, Kiet
Here's my code:
Private Sub Form_Load()
Dim dbConnection As New ADODB.Connection
Set rsResults = New ADODB.Recordset
strQuery = "SELECT * FROM tblCategory INNER JOIN tblInventory ON tblCategory.categoryId = tblInventory.categoryId"
dbConnection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Documents and Settings\k\My Documents\CrystalTest2\inventory.mdb"
dbConnection.Open
Set rsResults = dbConnection.Execute(strQuery)
Set DataGrid1.DataSource = rsResults
DataGrid1.Refresh
End Sub
I keep on getting a "rowset is not bookmarkable" error
Have no idea why this is happening. You should be able to bind the DataGrid to a Recordset and have it automatically filled? Right?
Thanks, Kiet