DataRow.Delete with SqlDataAdapter
A note to myself. I've figured this out few years ago, but it looks like I forgot it... :-D
Always use the Delete() method on the DataRow object instead of Remove(DataRow) on the DataRowCollection, or else the corresponding SqlDataAdapter.DeleteCommand won't trigger for an Update.
So deleting from the table won't work, no execution will be done.
Always use the Delete() method on the DataRow object instead of Remove(DataRow) on the DataRowCollection, or else the corresponding SqlDataAdapter.DeleteCommand won't trigger for an Update.
So deleting from the table won't work, no execution will be done.
Comments
Post a Comment