0

Hi I tried to update an image in a varbinary column with the following example How to insert a blob into a database using sql server management studio

Yet to do a select after doing update the varbinary column is blank, any idea why this happens?

UPDATE digital_files
   SET digital_file = (
        SELECT *
          FROM OPENROWSET( BULK N'C:\Program Files (x86)\Apache Software Foundation\Apache Tomcat 6.0.26\bin\celebrity-pictures-spongebob-patrick-meth-that.jpg',
                           SINGLE_BLOB) AS IMAGE)
WHERE digital_id = 1
Community
  • 1
  • 1
Mariah
  • 1,073
  • 1
  • 14
  • 33
  • Thanks Richard, the code is: " UPDATE digital_files SET digital_file = (SELECT * FROM OPENROWSET( BULK N'C:\Program Files (x86)\Apache Software Foundation\Apache Tomcat 6.0.26\bin\celebrity-pictures-spongebob-patrick-meth-that.jpg', SINGLE_BLOB) AS IMAGE) WHERE digital_id = 1 " But the field appears blank :( – Mariah Oct 26 '12 at 15:13
  • What does the select itself return if you execute just that? – Tim Lehner Oct 26 '12 at 20:14
  • when I do a select field after running digital_files update the field is completely blank me, if I give a LEN digital_files I realize it does have a size, I just do not know if I saved the image correctly, I have seen in other pages which should have are 0x .... Any ideas? – Mariah Oct 26 '12 at 20:29

0 Answers0