Replacing a column of data type - Image with varchar(MAX)

  • Hi Everyone ,

    One of our columns in a SQL Server 2005 database , is a image data type . This columns alredy has some data in it .... If i change the data type to varchar(max) will the data be corrupted

    Regards

    Sabarish


    wwewew

  • you have to use a varbinary(max) to replace an IMAGE datatype;

    I just tested it, and by simply changing the datatype with this command, i did not get any errors and was able to get the image back out of the table:

    alter table imgtest alter column imgblob varbinary(max)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks for the confirmation... i also did that and got the same rsult


    wwewew

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

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