|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Appending two data tablesHi -
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 Mark,
DataTable.Merge http://msdn2.microsoft.com/en-us/library/system.data.datatable.merge.aspx Be aware that this works conform the constrains of that datatable, therefore adding will only be if the keys of the new one are really different and higher than the old one. I hope this helps, Cor Show quoteHide quote "Mark" <M***@discussions.microsoft.com> schreef in bericht news:1D4BCA7E-38D9-412C-B549-C05FA7681BBA@microsoft.com... > 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 > Merge works for .NET Framework 2.0. (I'm running 1.0)
I used the ImportRow method: For i = 0 to dt.rows.count - 1 dtMain.ImportRow(dt.Rows(i)) next i Thanks for your comments Show quoteHide quote "Cor Ligthert [MVP]" wrote: > Mark, > > DataTable.Merge > > http://msdn2.microsoft.com/en-us/library/system.data.datatable.merge.aspx > > Be aware that this works conform the constrains of that datatable, therefore > adding will only be if the keys of the new one are really different and > higher than the old one. > > I hope this helps, > > Cor > > > "Mark" <M***@discussions.microsoft.com> schreef in bericht > news:1D4BCA7E-38D9-412C-B549-C05FA7681BBA@microsoft.com... > > 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 > > > > >
How about: How do I attach a file to an email w/MailTo: ?
Access rights for a web application to read a text file on a different server Collections strong reference between objects in different assemblies web reference to system.web.dll Converting VB Script Code to VB.NET 2005 SelectionChangeCommitted event TCP send & Recieve How to display Printer Settings Dialogue? Creating Worksheets from Existing Excel Instances in VB.NET? |
|||||||||||||||||||||||