I am trying to make a simple winform application in which i could read/update and insert data to MS Access db table
When i run the application it reads data from MS Access db, and I am able to add new data or edit existing data, but those changes are not sent back to DB.
Code in my Save button click event
Validate();
myBindingSource.EndEdit();
//myTableAdapterManager.UpdateAll(myDataSet.myTable); //this line was in generated code
myTableAdapter.Update(myDataSet.myTable); //replaced previous row with this one, but with no effect
When I press the "save" button
I do not receive any error message, in the DataGridView, new row contains ID with -1 value and new row is not added to database
What could be the problem? What am I missing?
When I opened mdb file from MS Access 2007 it is possible to add a new row to this table
This SO post seems to be about the same problem, but it does not help in my case
unable to add new row using datagridview using C# in Winforms
[EDIT]
I opened .xsd file and added Insert and Update Queries for myTable, but still that does not help - when i press Save button changes are not sent to the database