I'm trying to update certain records in a database after it's been filtered but get the following error: Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.
Now the code below is causing the error and there's not a primary key in the database for various reasons - but is there a way to change the saving code to something else?:
this.Validate();
this.tableBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.salesDataSet);
I've tried:
this.salesDataSet.AcceptChanges();
And it still throws the error?

1 answers
This seems to be a common problem with the TableAdapter and, as it's a fairly inscrutable error message, it's anybody's guess what causes it.
However, one tip I've seen for solving it is to call the Fill() method after UpdateAll() i.e:
So I'd try that.
answered one year ago by:
17279