c# - Getting a stable dataset after update -
I have a dataset that has modified, inserted and deleted the rows I send datasets. My intermediary gate changelog, which in turn, sends it to the server, which updates the database. I use GetChanges so I send some rows as possible
The server updates, inserts and removes the rows just fine and sends back the updated dataset which I can then return to my local Merge with dataset. The problem is that when the primary key does not match, I get duplicated additions / modified lines, so I think I want to call the rejected call after the merge which will delete all the remaining changes (this will be a duplicate). The problem is that all deleted rows are still left in datasets. The merge does not remove deleted lines, I need to call AcceptChanges to do this. Therefore, I need to accept both acceptance and reject but this is not possible.
Is there a good way to do this?
Thank you!
If you accept on a dataset, take care of yourself before sending changes in the middle class dataset (I.e. update, remove, add) In this way you do not need to merge changes because your dataset has already been updated.
You also have to consider what will happen and when these changes in the server will fail.
> See the MSDN article
Comments
Post a Comment