Bindind data-bound grids to ADO recordsets
I am having trouble setting the datasource property of the ADO grid control or the DataGrid control to a recordset, here is the situation.
Due to project limitations, I am not able to use a data control and then bind the grids to the actual data control. I've used the Active Data Objects(ADO) reference, (click project/references and put a checkc next to it). then fed the connection a conneectoin string, that all goes fine...then dim'd a recordset and gave it a valid SQL string. it returns the recordset properly, i tested it and it is getting the right data...the problem lies here.
I want to bind the recordset to a datagrid control(any of them)...but the datagrid controls only seem to want to be bound to actual data controls you draw on the form..(like the generic data control, or the ADO data control)...not the populated recordset.
I'm using "Microsoft DataGrid Control 6.0(sp5)"...attemping to bind it to a recordset created from the ADO reference, this is the error message I'm receiving:
Method or data member not found.
it's not expecting to receive a recordset like that.. if this helps, here is the prelimary code:
("rS" is a valid recordset btw)
rS.Open "SELECT * FROM INVENTORY", cOn, adOpenDynamic, adLockOptimistic, adCmdText
rS.MoveFirst
DataGrid1.DataSource = rS
bam...error right there. Anyone have any suggestions? Or perhaps know of a dataGrid control that will accecpt recordsets? Any help would really be appreciated.
~hunter
|