By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,959 Members | 2,432 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,959 IT Pros & Developers. It's quick & easy.

Identity in sqlbulkcopy

P: n/a
How do you handle identity fields when using SqlBulkCopy ?

textfile - no identity to sql server identity field - only additional field in sql server.

Sep 28 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Thu, 28 Sep 2006 13:00:16 -0400, "Shawn Ferguson" <SF******@cscc.eduwrote:
>How do you handle identity fields when using SqlBulkCopy ?

textfile - no identity to sql server identity field - only additional field in sql server.
If it is autoincrement SQL server will take care of it the same as it would if
you inserted it from SQL.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Sep 28 '06 #2

P: n/a
It's giving me an error, column mapping not matching up with source. How can that be avoided?
>>Otis Mukinfus<ph***@emailaddress.com09/28/06 1:33 PM >>>
On Thu, 28 Sep 2006 13:00:16 -0400, "Shawn Ferguson" <SF******@cscc.eduwrote:
>How do you handle identity fields when using SqlBulkCopy ?

textfile - no identity to sql server identity field - only additional field in sql server.
If it is autoincrement SQL server will take care of it the same as it would if
you inserted it from SQL.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

Sep 28 '06 #3

P: n/a
On Thu, 28 Sep 2006 13:55:42 -0400, "Shawn Ferguson" <SF******@cscc.eduwrote:
>It's giving me an error, column mapping not matching up with source. How can that be avoided?
>>>Otis Mukinfus<ph***@emailaddress.com09/28/06 1:33 PM >>>

On Thu, 28 Sep 2006 13:00:16 -0400, "Shawn Ferguson" <SF******@cscc.eduwrote:
>>How do you handle identity fields when using SqlBulkCopy ?

textfile - no identity to sql server identity field - only additional field in sql server.
If it is autoincrement SQL server will take care of it the same as it would if
you inserted it from SQL.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Make sure you didn't show a link to the primary key in the table. If you did,
the data will be one position off. If that's not the case, then I'm out of
ideas.

Anyone else seen this behavior?
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Sep 29 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.