Merge() confusion

  • Thread starter Thread starter Toni
  • Start date Start date
T

Toni

hello folks,

I have one dataset that I have modified (update, insert, delete).
I also have another dataset that I just reload fresh from the database.
Both datasets come from the same table.

The idea with merge is to merge the modified dataset and new dataset
together with preserving the changes made to the old one.

When I do that, i got duplicate result instead of the merged one.


What did I do wrong?

-Agung
 
Hi,

Try the Merge method with an optional second parameter, PreserveChanges. Set
it to true so that your changes in the first dataset will persist.

Regards
Joyjit
 
Hi Toni,

To start with, do you have a primary key defined on DataTable being merged?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top