changing column properties using sql-dmo

  • I would like to be able to switch the identity property of a column to false using sql-dmo, import some data to the table and swith the identity property of the column back to true. I can expose the properties using sql-dmo but i am unable to change them. Can anyone help me with this

  • Why not turn on "IDENTITY_INSERT" for that table instead during the duration of the insert? I assume the reason you want to turn off the identity property is becuse you want to insert some values into that field? Look at BOL for "IDENTITY_INSERT".

    Tim C.

    //Will write code for food

    One Windows to rule them all, One Windows to find them,

    One Windows to bring them all and in the darkness bind them

    In the Land of Microsoft where the Shadows lie.


    Tim C //Will code for food

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply