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!

Datagridview not updating 1

Status
Not open for further replies.

john62

Programmer
Oct 18, 2007
3
GB
Hi
I am new to vb.net after using vb6 for quite a while. I have connected an Access Database to my project and connected it to a datagridview using a tableadapter. I can see all the records fine and can change them on the screen in the grid. However none of the changes seem to go through to the database. I thought that the datagridview would save these changes automaticaly but this does not seem to be the case. Do I have to add code to get the changes made to a record to save to the database?

Also, does anyone know where there are any simple examples of a datagridview being used to add, edit, delete records in a table?

Cheers

John
 
John,
You fill a dataset using the adapter's fill command and then set it as the grid's datasource to display the data, right? well, in order to make changes to the Database, dataGridView wont do this automatically for you. You have to use the dataset's Update command for this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top