Hi!
I have a dataset which has modified, inserted and deleted rows. I send the dataset.GetChanges to my MiddleTier which in turn sends it to a server that updates the database. I use GetChanges so I send over as few rows as possible.
The server updates, inserts and deletes rows just fine and sends back the updated dataset which I then merge with my local dataset. The problem is that I get duplicated added/modified rows when the primary keys do not match. So I guess I want to call RejectChanges after the merge which would remove all changes left (this would be duplicates). The problem then is that all deleted rows are still left in the dataset. The merge does not remove deleted rows, I need to call AcceptChanges to do this. So I need to do both Accept and RejectChanges but it's not possible.
Is there a good way to do this? Any suggestions on how to solve this in the best way possible?
Thanks!