TedN Posted October 2, 2006 Posted October 2, 2006 I have a dataset table where I edit data, add rows and delete rows. When I update the source database using the Update() method the added rows and edited items go through fine, but the deleted rows are still in my database. I've tried AcceptChanges() but that seems to prevent all changes from being sent to the database. So, my problem is how do I update the database from my dataset so it accepts edited data, added rows and deleted rows. Thanks TedN Quote
HJB417 Posted October 3, 2006 Posted October 3, 2006 What database are you using and what DbDataAdapter are you using? Iterate through the DataTable rows and see if there are DataRow obejct's whose RowState is Deleted. Quote
TedN Posted October 4, 2006 Author Posted October 4, 2006 What database are you using and what DbDataAdapter are you using? Iterate through the DataTable rows and see if there are DataRow obejct's whose RowState is Deleted. Thanks for the reply. I've been checking out RowState and have a better understanding now. I don't use AcceptChanges at all now and use RowState to avoid accessing rows marked for deletion. Thanks, Ted Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.