2

I want to update the varbinary value(oXFFDFFEEEFFFF....) stored in an image field of sql server to null

3
  • 2
    And what is stopping you? What is the problem you are seeing with this? Commented Jan 3, 2011 at 15:30
  • 1
    Possible duplicate: stackoverflow.com/questions/4585177/… Commented Jan 3, 2011 at 15:33
  • i am getting an exception called 'The data types image and varbinary(max) are incompatible in the equal to operator' Commented Jan 3, 2011 at 15:36

1 Answer 1

1
UPDATE TableName SET ImageColumn = NULL WHERE Id = @Id
Sign up to request clarification or add additional context in comments.

5 Comments

Than u for reply, but i have already tried and got above exception
@user377855: Please update your post and give more information. Are you getting this error from SQL Server Management Studio, or is it in your application? Please post your code as well.
i am getting this exception in sqlserver mgmt studio,my query is:update organisation set logo= null where logo=0xFFD8FFE00010.......
i am getting this exception in sqlserver mgmt studio,my query is:update organisation set logo= null where logo=0xFFD8FFE00010....... here organisation is tablename, logo is column of type image and can i replace that value with null or with any other binary value
i think your problem is with your "where" condition. try to set it to the ID of the record instead of the logo value

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.