well firstly, you shouldnt use AcceptChanges() in this case as it will tell the DataAdapter (which fills the records to the dataset from the database and updates the database from the new values in the dataset) that there are no updates to be made but infact there is. So comment that out.
Secondly, to finally update the database, you need to use the DataAdapter and use its Update() method, giving it the dataset or datatable to update with. However you need to have the correct Commands in place in order to successfully update the database, commands like InsertCommand, DeleteCommand, UpdateCommand. There are many examples on these forums, so take a look and see which one can help you.
You may also be interested in this:
http://msdn2.microsoft.com/en-us/library/system.data.oledb.oledbdataadapter.aspx
http://msdn2.microsoft.com/en-us/library/at8a576f.aspx
Does this give you some guidence
|