Thursday, May 31, 2012

SET IDENTITY_INSERT

If you get this error message in SQL:

Msg 544, Level 16, State 1, Line 1 Cannot insert explicit value for identity column in table 'YOURTABLENAMEHERE' when IDENTITY_INSERT is set to OFF.

 
 

I think the thing to do is something like this:

SET IDENTITY_INSERT YOURTABLENAMEHERE ON

No comments:

Post a Comment