开发者

ADO.NET tableadapter add/update/delete

开发者 https://www.devze.com 2022-12-29 20:46 出处:网络
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.

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 d开发者_StackOverflow中文版elete 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);


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消