Code:
Private withevents con as ADODB.Connection
Private withevents rscons as ADODB.Recordset
Set con = New ADODB.Connection
con.ConnectionString = "your connectionstring"
con.Open
Set rscons = New ADODB.Recordset
Set rscons.ActiveConnection = con
rscons.CursorType = adOpenDynamic
rscons.CursorLocation = adUseClient
rscons.Open "select * from mytable"
Set DataGrid1.DataSource = rscons
I think the datagrid recordset has to be updatable??, hence canNOT set it with a con.execute(select ....) which results in a forward only non-updatable recordset.
Hope this helps.
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).