I am trying to update a varbinary(MAX) column, it actually stores saved data of a Word file that an user uploaded from a website.
What happened was an user uploaded a wrong file so I need to update the column to reflect a correct file.
What I did was that in a testing machine I uploaded the correct file so it was saved to the database and I can see and copy the "varbinary(MAX) value" and use it to replace the wrong one
The value looks like: 0x504B03041400060008000........FBB9
I tried a straight forward UPDATE query:
UPDATE my_table Set datafile = 0x504B03041400060008000........FBB9
It says 1 row(s) affected, but that file can't be open after downloaded from the font-end web, I notice that saved value is 0x0504B03041400060008000........FBB
(1 more extra 0 after 0x and the 9 at the end disappeared)
How do I do this?