Menu

#3 MS-SQL identity_insert

open
nobody
None
5
2005-06-06
2005-06-06
No

I am having trouble importing data into MS-SQL. It's
generating warning about inserting data with
auto-increment fields.

The solution is to send a query like:

SET IDENTITY_INSERT mos_modules ON

before the table data is inserted, then when it's finished:

SET IDENTITY_INSERT mos_modules OFF

What is a reasonable way to include this specific code?

Discussion


Log in to post a comment.