This topic is locked

IDENTITY_INSERT is set to OFF

8/16/2006 9:35:51 AM
ASPRunner.NET General questions
C
colinmac author

Hi I have an error on a SQL/ASP.net database project I am working on. I have 5 tables one of which is called protection. When I try to enter data from my from generated by ASP runner I get the following message.
Error description: Cannot insert explicit value for identity column in table 'Protection' when IDENTITY_INSERT is set to OFF.
I am sure this an SQL error..
I have read up on these messages and I have done the following: service packed my SQL Server, set the identity to Yes 1,1 (thus allowing autonumbers) for the primary key that has an int value. Assigned all the permmisions to allow inserting and updating.
The strange thing is I have a Mortgage table set up exactly the same and when I insert data it works ok..
Any ideas anyone I am pulling my hair out here!!
Colin

Eugene 8/16/2006

Could you please send me your project (including project file, output directory and database backup) with this error on support@xlinesoft.com? I will investigate it on my box.

C
colinmac author 8/17/2006

I have sorted the problem now, the ASP pages were trying to in sert data into the ID field which was set as an autonumber
Thanks
Colin

P
ptlattamen 10/10/2007

Hi, can you tell me how you resolved it? I am getting the same error. My ID field in my SQL db is set to auto number as well.

I would like to keep it auto number. how did you resolve it? Much appreciated! thanks!

Eugene 10/12/2007

You can disable auto number fields from add/edit pages. You can do it in asprunner.net wizard, step 6 (choose fields)