How i can set IDENTITY_INSERT to ON in "LINQ to SQL" ?
-
i'm getting an error that
"Cannot insert explicit value for identity column in table 'Comment' when IDENTITY_INSERT is set to OFF"
i'm using "LINQ to SQL" in ASP.NET so how can i set IDENTITY_INSERT to ON? :^)use a stored procedure
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams "Let me get this straight. You know her. She knows you. But she wants to eat him. And everybody's okay with this?"
-
i'm getting an error that
"Cannot insert explicit value for identity column in table 'Comment' when IDENTITY_INSERT is set to OFF"
i'm using "LINQ to SQL" in ASP.NET so how can i set IDENTITY_INSERT to ON? :^)Why are you trying to insert an identity value? These are usually incremented automatically when a row is inserted into the DB and inserting your own value could cause a duplication in this column. You can open the table in Management Studio and turn off the indentity property for the column. Mike
-
i'm getting an error that
"Cannot insert explicit value for identity column in table 'Comment' when IDENTITY_INSERT is set to OFF"
i'm using "LINQ to SQL" in ASP.NET so how can i set IDENTITY_INSERT to ON? :^)hello, This thread might help IDENTITY_INSERT and linq[^]
-
Why are you trying to insert an identity value? These are usually incremented automatically when a row is inserted into the DB and inserting your own value could cause a duplication in this column. You can open the table in Management Studio and turn off the indentity property for the column. Mike
-
use a stored procedure
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams "Let me get this straight. You know her. She knows you. But she wants to eat him. And everybody's okay with this?"
How ?
Help people,so poeple can help you.