Cannot insert explicit value for identity column in table 'customers' when IDENTITY_INSERT is set to OFF. RRS feed

  • Question

  • Goodday I get the error message like this when i have the primary key set to CustomerId and Identity specification is set to 'yes'. Identity incrument and identity seed  = '1' Otherwise if Identity specification is set to 'No' then i don't get this error.

    I would like to keep these settings ( as 'Yes')so as database may look after the primery key column for me . But how can i set my editor to over come this error . I.m using visual studio 2010 express and writing in vb,


    • Edited by robhare Tuesday, September 13, 2011 10:24 AM
    Tuesday, September 13, 2011 10:20 AM