Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the datasource for a datbound grid control

Status
Not open for further replies.

PeteG

Programmer
Feb 23, 2001
144
GB
Hi,
I have a form with a datagrid on it. In code, I set the datasource of the datagrid to be a recordset that I have opened, like this:

Set grdDataGrid.DataSource = rstEvent

The ADO connection from which I create the recordset uses the Microsoft.Jet.OLEDB.3.51 provider. I'm having problems running this on a 'clean' PC build because, I think, it has Office 2000 pre-loaded and some conflict arises between 3.51 and 4.0 (?). Therefore, I'm trying to use Microsoft.Jet.OLEDB.4.0 provider instead

BUT, when I get to setting the datasource above, it no longer works. No error is generated when I step through this line of code but the datagrid doesn't accept the recordset as its' source, eg, the columns count doesn't increase to the number of fields in the recordset and the column titles don't take on the field names of the recordset.

I'm stuck on this X-) and any help/advice would be appreciated!

Thx

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top