I am getting the error while to insert values to database table:
Cannot insert explicit value for identity column in table 'ref_user'
when IDENTITY_INSERT is set to OFF.
Please help me out ???
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The reason you are getting this error is that you are trying to insert in a table with Auto Increment field being used as primary ke.
In your command, you may set the
Identity_Insert Onand thenOffafter insertion. Something like: