Is there a way to override values in merging DataTables using .Merge() method?
For example if I have two DataTables with the same schematics.
Both have two Columns: Names | Enabled;
DataTable1 first row entries are: Peter Punani | true;
DataTable2 first row entries are: Peter Punani | false;
If I merge them using .Merge() method - DataTable1.merge(DataTable2);
-, DataTable1 will then have 2 rows and look like this:
Names | Enabled;
Peter Punani | true;
Peter Punani | false;
Now obviously if I try to .Update() that using SqlCommandBuilder to my SQL DB it will give me an error statement, because of two identical values in my Primary Key(Names).
But I want DB1 to accept the differences from DB2, so it would look like: (and do that with all other entries that differ from DB1.)
Names | Enabled;
Peter Punani | false;
So what is the best way to merge these tables, so I can update them properly?