Microsoft Fixes SET IDENTITY_INSERT ON Statement Error
Microsoft has released a hotfix for an error that you may receie when running a SET IDENTITY_INSERT ON statement on a table.
December 22, 2004
Microsoft has released a hotfix for an error that you may receive when running a SET IDENTITY_INSERT ON statement on a table. In SQL Server 2000, when you run a SET IDENTITY_INSERT ON statement on a table, then try to run a query to insert a row into the table that contains an identity column, you might receive an error message that looks like: "Cannot insert explicit value for identity column in table 'TableName' when IDENTITY_INSERT is set to OFF." This problem occurs when the client-cached cursor query isn't invalidated and the query uses the prior setting of SET IDENTITY_INSERT OFF when it tries to insert the row. To find out more about this problem and the supported hotfix, read the Microsoft article "FIX: You may receive an error message when you run a SET IDENTITY_INSERT ON statement on a table and then try to insert a row into the table in SQL Server 2000" at
Read more about:
MicrosoftAbout the Author
You May Also Like