Link to home
Start Free TrialLog in
Avatar of mpdillon
mpdillon

asked on

Copy a row using ADO.Net

I need to duplicate an existing row in a table. Before finishing the Insert of the new row, I need to change a few fields. Also, I do not want to copy the last field in the row as it is an Identity field.
I would like to use a For Next loop so I do not have to write out all the field names.
I would like to ADO.Net to do this.
thanks,
pat
Is there an ADO.net ZONE on Experts Exchange? I looked but could not find it. If there is would you please post the path.
Avatar of rawinnlnx9
rawinnlnx9
Flag of United States of America image

In this part 2: http://www.4guysfromrolla.com/articles/071002-1.2.aspx of a 2 part article what you want is discussed in detail. If you need to know how to set the whole thing up start here: http://www.4guysfromrolla.com/articles/071002-1.aspx
Avatar of mpdillon
mpdillon

ASKER

RawinnInx9,
I looked at the articles, they seem to focus on datagrids which I am not using. My program does not have any user interaction and does not use datagrids.
ASKER CERTIFIED SOLUTION
Avatar of srikanthreddyn143
srikanthreddyn143

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It is the end of the day now and the client is kicking me out. But that looks like it will work. It will be next Monday before I return to test it.
thanks,
pat