> dataset2.tables.add(dataset1.tables(tablename))
Use the Dataset.Merge method
http://msdn.microsoft.com/library/de...mergetopic.asp
Ex:
dataset2.Merge(dataset1) 'merges entire dataset
dataset2.Merge(dataset1.Tables("tablename")) 'merges a specific table
Note:
If dataset2 is empty it will copy all tables from dataset1 into dataset2.
If dataset2 and dataset1 have tables with identical table names, this will
merge the data in dataset1 tables into dataset2 tables.
If dataset2 and dataset1 have tables with different table names, this will
copy the tables from dataset1 into dataset2.
Paul