My apologies it was something I didn’t have chance to test. Try using the DBCC statement after running the function 'SET IDENTITY_INSERT tablename ON' it might then work. I have not had chance to test this also.
You will need to run 'SET IDENTITY_INSERT tablename OFF' afterwards.
If this doesn't work can you explain what you are trying to achieve in more detail.
Read about "DBCC CHECKIDENT" in SQL Books Online. The article explains how to reset seed values under certain conditions such as having data in the table.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.