July 3, 2007 at 1:17 pm
Hello,
I have a column with type 'varbinary' containing signatures. What is the easiest way to store the value of this field in an XML file so I can pass on that XML to another group (which doesn't have MSSQL Server).
Thank you
July 6, 2007 at 8:29 am
July 6, 2007 at 10:49 am
Easiest way for you is to use FOR XML RAW and BINARY BASE64. Example is from BOL:
USE AdventureWorksGOSELECT ProductPhotoID, ThumbNailPhotoFROM Production.ProductPhotoWHERE ProductPhotoID=1FOR XML RAW, BINARY BASE64 ;GO
produces
<row ProductModelID="1" ThumbNailPhoto="base64 encoded binary data"/>
Of course, it will be up to the destination application to handle to blob data appropriately.
Hope this helps
Mark
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply