Hi,
Does anyone know how to set the datagrid
to an existing ADODB Recordset?
I've been trying the following but nothing happens :-
set datagrid1.datasource = rs
Any help would be very welcome
Printable View
Hi,
Does anyone know how to set the datagrid
to an existing ADODB Recordset?
I've been trying the following but nothing happens :-
set datagrid1.datasource = rs
Any help would be very welcome
This code works fine for me:
Code:Dim cn As ADODB.Connection
Dim rs As New Recordset
Set cn = New Connection
cn.Open "Provider=SQLOLEDB.1;Data Source=NTSRV;Integrated Security=SSPI;Initial Catalog=Northwind"
rs.Open "Select * from customers", cn, adOpenStatic, adLockReadOnly
Set Me.DataGrid1.DataSource = rs