|
-
Aug 5th, 2006, 07:37 AM
#1
Thread Starter
Addicted Member
Append data to the already existing dataset?
Hi folks,
I have a dataset(global) which has already got some data in it. After some processing I get the new set of data in a new dataset, and the datatable has go the same structure as the global dataset table. I want to append this new set of data in the global dataset table. i.e if there are already 5 records in the global dataset table and now if there are 3 new records, I want to add these 3 records to the global dataset table so that there are total 8 records in the global dataset table.
Please let me know.
Thanx in advance.
Regards,
Samir.
-
Aug 5th, 2006, 09:31 AM
#2
Re: Append data to the already existing dataset?
If the two DataTables have the same schema you can use the ImportRow method of the target table to copy the contents of each row in the source table to a new row in the target.
VB Code:
For Each row As DataRow In sourceTable.Rows
targetTable.ImportRow(row)
Next row
-
Aug 6th, 2006, 11:51 PM
#3
Thread Starter
Addicted Member
Re: Append data to the already existing dataset?
Thanx a lot jmcilhinney. I will try it out.
Regards,
Samir.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|