Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Why am I all of a sudden getting this error?

Author  Topic 

Cheryl01
Starting Member

5 Posts

Posted - 2008-11-30 : 13:37:28
I was updating this table before.. I have a trigger that also updates the table and now I'm getting the error:Error Source .netSqlClient data provider..Error Message:canot insert explicit value for indentity column in table 'tblServiceQuote' when IDENTIY_INSERT is set to off..

I did not set identity insert to off so what happended? How do I turn it back on? Is it specific to one column?

Here is some more info that may be important..

When a customer is added to tblCustomer the CustID is added to tblServiceQuote via trigger.. CustID is not an identity column in ServiceQuote.. It is in tblCustomer.. The identity column in tblServiceQuote is QuoteID and it increments.. The trigger works fine but when I try to edit the row it gives me the error...

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-11-30 : 13:56:33
What table are you inserting into and what is its schema? Can you post the insert statement?
What's the definition of the trigger and what's the schema of the table that it inserts into

--
Gail Shaw
SQL Server MVP
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-01 : 00:07:48
quote:
Originally posted by Cheryl01

I was updating this table before.. I have a trigger that also updates the table and now I'm getting the error:Error Source .netSqlClient data provider..Error Message:canot insert explicit value for indentity column in table 'tblServiceQuote' when IDENTIY_INSERT is set to off..

I did not set identity insert to off so what happended? How do I turn it back on? Is it specific to one column?

Here is some more info that may be important..

When a customer is added to tblCustomer the CustID is added to tblServiceQuote via trigger.. CustID is not an identity column in ServiceQuote.. It is in tblCustomer.. The identity column in tblServiceQuote is QuoteID and it increments.. The trigger works fine but when I try to edit the row it gives me the error...


how are you trying to edit this? in query window or right clicking table?
Go to Top of Page
   

- Advertisement -