简体   繁体   中英

How to delete the rows in DataSet table and make it reflect in the database using SQL DataAdapter?

I am executing row.Delete() and dataAdapter.Update(dataset, "mytable")

I have specified delete command as well for data adapter.

But the deleted rows are not getting deleted in the database.

Am I missing anything? Insert and update are working.

I donot want to use CommandBuilder .

Have you setup you're dataAdapter.DeleteCommand? MSDN - this is the command that will be fired for each row in the DataTable that has been deleted.

Might be the cause.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM