I want to update the varbinary value(oXFFDFFEEEFFFF....) stored in an image field of sql server to null
-
2And what is stopping you? What is the problem you are seeing with this?Oded– Oded2011-01-03 15:30:41 +00:00Commented Jan 3, 2011 at 15:30
-
1Possible duplicate: stackoverflow.com/questions/4585177/…Phil Hunt– Phil Hunt2011-01-03 15:33:09 +00:00Commented 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'user377855– user3778552011-01-03 15:36:07 +00:00Commented Jan 3, 2011 at 15:36
Add a comment
|
1 Answer
UPDATE TableName SET ImageColumn = NULL WHERE Id = @Id
5 Comments
user377855
Than u for reply, but i have already tried and got above exception
Phil Hunt
@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.
user377855
i am getting this exception in sqlserver mgmt studio,my query is:update organisation set logo= null where logo=0xFFD8FFE00010.......
user377855
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
Yousi
i think your problem is with your "where" condition. try to set it to the ID of the record instead of the logo value