2

I've checked this but it did not worked for me.

Can anyone please tell me how can I update Datatype Image column in SQL Server 2008 R2.

For example,

Update TableName
Set ShowImage = '0xFFD8FFE000104A46494600010101004800480000FFDB0043000604040405040605050609'
WHERE Id =1 

This is not updating. :(

Please suggest the best and easy way to update the Image datatype column.

Thanks a lot.

3
  • 4
    And, of course, ntext, tex and image: "ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them" Commented Dec 30, 2015 at 7:24
  • I'm not going to regurgitate the documentation that I've already given you a link to. Commented Dec 30, 2015 at 7:30
  • Sorry @Damien_The_Unbeliever - I have not checked that link. BTW thanks for giving me knowledge. :) Commented Dec 30, 2015 at 7:32

1 Answer 1

1

Try to remove '' in following:

Update TableName
Set ShowImage = 0xFFD8FFE000104A46494600010101004800480000FFDB0043000604040405040605050609
where Id =1 

You have to use VARBINARY(MAX) instead of IMAGE datatype according to @Damien_The_Unbeliever provided documentation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.