|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Updating autogenerated Key fields in SQL SERVER 2005Hello Guys,
I need to update from Access a table in SQL SERVER 2005 that contains autogenerated keys. The EM didn't allow me to do so through the import data tool. Then, my question is Can I do that in SQL SERVER 2005 ?. if not, is there any way to go around it ?. Regards, Pablo Silva Pablo.Si***@aspentech.com I can't speak for the tool part of the question (Access), but here is how SQL Server work:
If the column in question has the IDENTITY attribute, then you cannot UPDATE that value. You can specify a value for INSERT, using SET IDENTITY INSERT ON. -- Show quoteTibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "Pablo Silva" <Pablo Si***@discussions.microsoft.com> wrote in message news:EF2A0A68-6A2C-4D53-9267-45CC7B25F1F2@microsoft.com... > Hello Guys, > > I need to update from Access a table in SQL SERVER 2005 that contains > autogenerated keys. The EM didn't allow me to do so through the import data > tool. > > Then, my question is Can I do that in SQL SERVER 2005 ?. > > if not, is there any way to go around it ?. > > Regards, > > Pablo Silva > Pablo.Si***@aspentech.com |
|||||||||||||||||||||||