Transfer records from dataset or datagrid into SQL Database

charmed30_jm

New member
Joined
Oct 21, 2007
Messages
2
Programming Experience
1-3
Need help....Transfer records from datagrid or dataset to SQL Database..

I have a windows forms datagrid on a form and all i wanna do i to update the records in a table in the database by getting the values from the datagrid and transferring it to the database table. I wanna do this by clicking on a button... any ideas....
 
Please don't post the same question in more than one place.

This has nothing to do with the DataGrid, so I have merged the two threads and kept the result in Data Access. The DataGrid is just an interface to display the data to the user and to let them edit it. The grid doesn't care where the data came from or where it goes to. As far as data access goes, you populate a DataTable and then save it. Whether it's bound to a DataGrid in between or any one of a million other things makes no difference to how you retrieve the data or how you save it. Take a look at these ADO.NET examples, paying special attention to the fourth and fifth code snippets, which match your scenario.
 
Back
Top