October 18, 2004 at 6:30 pm
Hello all,
trying to create a record on a webpage I created but i'm getting
this error message....
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit value for identity column in table 'tblBooking' when IDENTITY_INSERT is set to OFF.
How do I go about turning this feature on ?
Regards,
Mitch....
October 18, 2004 at 7:32 pm
Hi Mitch
Sounds like you are trying to insert an explicit value into a field that has been designed to assign its own values automatically on insert (possibly an auto-incrementing primary key in tblBooking).
Assuming that you are aware of this and doing it deliberately for some reason, check out SET IDENTITY_INSERT in BOL and that should help you out.
Alternatively, just remove the identity field from your insert query and let SQL Server handle the job.
Regards
Phil
October 19, 2004 at 12:03 pm
Thanks Phil,
yes, I created the table in Access and then upsized it.
The ID field is an autonumber field so I guess that is causing me the trouble.
Thanks again for your help,
Mitch....
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy