-4

Good afternoon!

I am Fabiano. At first my English is bad. I'm using an online translator. I have a project for my CBT at the University. The problem is that the SQL Server calls an explicit value as the IDENTITY_INSERT is off. How to solve it? See the image...

enter image description here

And the project is for Windows Desktop. I'm using Visual Studio 2013 Ultimate. The programming language is C #. Right now, I'm very grateful.

Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555
  • 1
    You might want to explain a little more about the problem, add some code snippets and translate the error text to English (since it's in spanish). – Yotam Salmon Jan 09 '16 at 20:33
  • Possible duplicate of [How to put SET IDENTITY\_INSERT dbo.myTable ON statement in my C# app](http://stackoverflow.com/questions/3373037/how-to-put-set-identity-insert-dbo-mytable-on-statement-in-my-c-sharp-app) – Camilo Terevinto Jan 09 '16 at 20:33
  • @YotamSalmon it's Portuguese, not Spanish. I agree with your comment though... The OP error says "it was not possible to register you: it is not possible to insert a specific value for an identity column in the table TbLogin when IDENTITY_INSERT is set to off" – David Brossard Jan 10 '16 at 15:46
  • Oh, sorry for the mistake, and thanks for the translation. – Yotam Salmon Jan 10 '16 at 15:53

1 Answers1

0

It looks like IDENTITY_INSERT is OFF (it is default value).
If you are intentionally trying to insert value into Identity column, then you have to set IDENTITY_INSERT ON with following command.

SET IDENTITY_INSERT TbLogin ON
tchelidze
  • 8,050
  • 1
  • 29
  • 49