all groups > vb.net data > may 2006 >
You're in the

vb.net data

group:

Appending two data tables


Appending two data tables Mark
5/1/2006 1:06:01 PM
vb.net data:
Hi -

I'm looking for a code sample that will let me append a data table to a
second master data table. You can assume that the tables' structures are
identical.

Seems like there should be a method to do this, but I can't find one.

Thanks,
Mark

Re: Appending two data tables Paul Clement
5/2/2006 7:35:52 AM
[quoted text, click to view]

¤ Hi -
¤
¤ I'm looking for a code sample that will let me append a data table to a
¤ second master data table. You can assume that the tables' structures are
¤ identical.
¤
¤ Seems like there should be a method to do this, but I can't find one.

Can you use the DataSet Merge method?


Paul
~~~~
Re: Appending two data tables Mark
5/3/2006 6:15:01 AM
Paul -

I'm using .Net framework 1.0 - I think Merge is in 2.0 and higher.

What I used instead was Tables.ImportRow method (in a loop) to add new
records in the new table to main table.

Pretty easy once I got it figured out.

Thanks,
Mark


[quoted text, click to view]
AddThis Social Bookmark Button