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

writing datagrid to mysql database 1

Status
Not open for further replies.

aongusa

Technical User
Sep 24, 2004
30
IE
Hi,

Does anyone know how to add data from a datagrid control into a mysql database?

Regards,

aongusa
 
A datagrid control, suprisingly, doesn't contain any data. It is just a window into its recordsource which may be a data control or a recordset (ADO only).

You can loop through the data control's recordset (or the recordset that's the recordsource for the grid) and run INSERT INTO statements to populate your table.

Alternatively, you can run an INSERT INTO using the same SQL that you used to populate the recordsource recordset.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top