copy datarow vb.net strongly typed Dataset
Posted on 2006-11-30
I am using strongly typed datatables. I have a datatable filled from a dataAdapter. I want to copy some of the rows in the table, add them as new rows to the same the data table (so the same details for all columns) but they should auto generate themselves new keys and then post this back to the database, so under the hood only the newly added rows will get inserted to the DB. I just need an easy way to copy existing rows and do the add as then I should be able to just call Update and RowState.Added rows will get inserted right?
Also if I need to to change one colum's data for the new row's, an Foreign key, would this be easy?
Any help, thanks?