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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -