Reputation: 18328
I'm using the table adapter in C# where visual studio generates the code for you. I have inserts and updates working just fine using the following code.
However when trying to delete using the .update it gives me the following error.
Update requires a valid DeleteCommand when passed DataRow collection with deleted rows.
this.workersTableAdapter.Update(this.nursery_dbDataSet_workers.workers);
Upvotes: 1
Views: 2181
Reputation: 273574
Open the DataSet designer and click on the Adapter. In the properties windows it has 4 Command properties, check the DeleteCommand. It seems to be missing.
You cam rerun the wizard or write the Delete Sql by hand.
Upvotes: 1