Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET IDENTITY ON and OFF
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01545210
Message ID:
01545214
Views:
33
>>>>Hi,
>>>>
>>>>First time this morning I get an error (actually customer does) when on inserting of a new records the error is
>>>>
>>>>Cannot insert explicit value for identity column in table 'tableName' when IDENTITY_INSERT is set to OFF
>>>>
>>>>
>>>>I Googled this and found a MSFT msdn page that describes that only one table in a session can have SET IDENTITY_ INSERT ON. I have not had to "deal" with this from my VFP application so far. So my question is, do I need to do something in the VFP application on every insert? That is, do I need to send an explicit command to the SQL Server?
>>>>What else could be causing this problem, kind of, all of a sudden?
>>>>TIA.
>>>
>>>Just make sure that you didn't touch that field anywhere in your statements.
>>
>>I thought I didn't. And I will recheck. Thank you.
>
>If you are using CAs, just make sure that this field is not listed in "UpdatableFieldList" property.

Yes, I do use CAs. And the field is not in the UpdateableFieldList. And I even tested the same program on my computer with my copy of the SQL Server and it worked (no error). So it must have been something that happened in the customer database or session that caused the program. I am waiting now for him to call me back so that I could ask him to try inserting a record again.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform