Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I use DataSet.Merge for this?
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Can I use DataSet.Merge for this?
Miscellaneous
Thread ID:
01102193
Message ID:
01102193
Views:
61
Hi all,

I have a DataTable with an int16 primary key column and an int32 column. I have another DataTable with the same structure (although the int32 column has a different name. I want to end up with a DataTable with 3 columns -- the int16 primary key (same in both tables), and both int32 columns (one from each table). Right now, I have it working by iterating the second table, using Find to get the matching row in the first table and then copying the value from the second table into the first (I added a third column in that table for this to work).

This method works, but it seems like the Merge method of the DataSet should be able to do this. When I add the first table into a DataSet, the best I can get the Merge to do is to overwrite the int32 values in the first table with those of the second.

Am I doing something wrong or can I simply not use Merge for this?

TIA,
Chad
_________________________________
There are 2 types of people in the world:
    Those who need closure
Next
Reply
Map
View

Click here to load this message in the networking platform