tags:

views:

325

answers:

2

while user edits the datagridview, it does not save changes to Access MDB file ?

this is not working..

TableAdapter.Update(DataGridView1.DataSource)

A: 

You'll need to update the data source explicitly.

The exact mechanism will depend on the data source attached to the view (via the .DataSource property).

dataTable.AcceptChanges();

will update the in memory DataTable object.

ChrisF
Unless I am very mistaken, AcceptChanges only commits changes to the in-memory DataTable, but does not propagate them to the database. You would need to call Update() on the DataAdapter attached.
Cerebrus
Ah - OK I'll update the answer
ChrisF
If you post your code in the question it'll get correctly formatted (assuming you hit the "0101" icon) and it'll make more sense. I'm primarily a C# developer so I have to think a bit more when it comes to VB :)
ChrisF
A: 
BindingSource.endedit()
adapter.update()

does a trick.

Tom