Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

guys i encounter an error like this when i try to add a new record and i don't understand it. i am using vb.net with sqlserver

"An explicit value for the identity column in table 'supplier' can only be specified when a column list is used and IDENTITY_INSERT is ON."

please help

Posted
the error is a bit vague but it appears to me that the record you are trying to insert has an int identity or autonumber and the code you are using is trying to assert a primary key value. check the INSERT statement to see if your dataset or code is trying to specify what the primary key value will be - SQL server is probably handling this management itself and saying to your vb.net code "Bugger Off thats my job PaL"...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...