This topic is locked
[SOLVED]

  Identity insert error on phprunner

12/5/2011 1:07:01 PM
ASPRunner.NET General questions
A
amoratorio author

Hi I'm trying to insert a record into a database MS SQLServer, where the key is an IDENTITY field, this is the error I get:

"

Source: Microsoft OLE DB Provider for SQL Server

Description: Cannot insert explicit value for identity column in table 'Empresas' when IDENTITY_INSERT is set to OFF."
Tia.

Sergey Kornilov admin 12/7/2011

Alan,
I recommend to remove identity field from the Add page to allow database generate a new value for this field.

A
amoratorio author 12/12/2011

Thanks! I will try this solution and then tell you how I will

A
amoratorio author 12/13/2011



Alan,
I recommend to remove identity field from the Add page to allow database generate a new value for this field.


Sergey:

I removed the field in the Add page, but still giving me that error and not allow me to insert a new record in the db, this is the error message:

<<< El registro no ha sido añadido >>>
Source: Microsoft OLE DB Provider for SQL Server

Description: Cannot insert explicit value for identity column in table 'Empresas' when IDENTITY_INSERT is set to OFF.
Tia,