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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

binding to datagrid 1

Status
Not open for further replies.

KeithCE

Programmer
Sep 6, 2002
52
US
Is there a way to bind to a datagrid without using the ado control or data control? Bind through code only.

I can not seem to find an answer or sample code. Everything I run into uses the ado control, which I don't want to use.

Thanks, for any help.
 
To get started go to Project menu, add a Form and use the DataForm Wizard. On the appropriate page choose 'Use ADO code'.

From there you will get a good starter, with the basic connection code in the Form_Load event. You can modify to suit from there.

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 

Yes, the dataform wizard is a good start.
Make sure you change the references to ADO from 2.0/2.1 to at least 2.5 so all the events created for ADO by the dataform wizard work.

I think there also are pleanty of examples in this forum on how to create a recordset from ADO.
Once done, you only need to set the grid's datasource to the ADO recordset.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top