Reputation: 123
I have two DataTable with same schema and very similar data. One has data from web service, second from local XML file (data saved from last session).
What I want to do is:
I have problem in step one. When I merge two DataTable, I got exception that primary key already exists in DataTable. This is not behavior I need. In this case DataRow should be updated, not added.
Mayby someone know easy way to solve this problem. Thanks a lot.
Upvotes: 0
Views: 2495
Reputation: 123
Article linked by Honza Kovář have an example. This code works fine and looks the same as my code. I found problem in typed dataset I created. I have made a mistake and set field to key, not to primary key.
Upvotes: 1