SQL Server 2005: Getting error when setting auto increment on one of two primary keys -


i getting error "cannot insert explicit value identity column in table 'table' when identity_insert set off."

the table has 2 primary key, 1 set auto-increment, 1 set value passed into.

is possible in sql server 2005? or missing something?

thanks alot in advance.

you trying insert value identity column can

set identity_insert tablename on insert tablename() values () set identity_insert tablename off 

http://msdn.microsoft.com/en-us/library/ms188059.aspx


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -