How to create a copy of a row?

Cricket

Active member
Joined
Jan 6, 2005
Messages
28
Location
Hamilton, ON, Canada
Programming Experience
5-10
I've created a Sub that uses a row passed to it to add it to another table. However when I try and add the row to the other table I recieve an error stating that this row already belongs to another table. Well of course it does, I want a copy of it in this new table!!!!!

How do I get a copy of this row so that I can add it to this new table?
 
Well you could loop through each cell and copy the value to an array, then add the array to the new table.

TPM
 
Use the dataTable.ImportRow method.

Also of interest is the dataTable.Clone function which makes a copy of the table structure (or schema).
 
Back
Top