How to get identities of inserted data records using SQL bulk copy
Posted
by Olga
on Stack Overflow
See other posts from Stack Overflow
or by Olga
Published on 2010-03-24T14:00:05Z
Indexed on
2010/03/24
14:03 UTC
Read the original article
Hit count: 537
Hello
I have a ADO.NET dataTable with about 100.000 records. In this table there is a column "xyID" which has no values in it, because they are generated by insertion into my MSSQL Database. Now i have the problem, that i need this IDs for other processes. I am looking for a way to bulk copy this dataTable into the MSSQL database, and within the same "step" to "fill" my dataTable with the generated IDs.
Thank you for your answers!
© Stack Overflow or respective owner