AcceptChanges() Problem

TedN

Freshman
Joined
Sep 25, 2006
Messages
35
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
 
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.
 
HJB417 said:
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
 
Back
Top