Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I use DataSet.Merge for this?
Message
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Can I use DataSet.Merge for this?
Divers
Thread ID:
01102193
Message ID:
01102193
Vues:
62
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform