Error in insert
Posted on 2004-04-20
Hello, I'm doing an SQL Insert statement and I'm getting this error (in Spanish, I translated it):
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Only one explicit value can be specified for the identity column of the table 'AAA' when a list of columns is used and IDENTITY_INSERT is ON.
I just don't know what is happening, i tried the insert in the query analyzer and it worked, then I put the same statement in the asp page (even though without using data of the form, directly with data written by me in the SQL Insert statement, just like I tested in the query analyzer) and I got the error.
It says that the error is in the line when I do:
Below, I'm using SELECT @@IDENTITY to recover the identity and insert in other tables, but I erase all of this part of the code and the error it's still there, in the line of Execute.
Thank you, hope you can help me ;)