Home All Groups Group Topic Archive Search About

Updating autogenerated Key fields in SQL SERVER 2005

Author
11 Oct 2006 9:01 PM
Pablo Silva
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

Author
12 Oct 2006 7:10 AM
Tibor Karaszi
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 quote
"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

AddThis Social Bookmark Button