I am designing my database to hold records of user profiles.
These user profiles have the standard: title, name, biography and each have a picture which I need save in the table also
I need to generate an XML output for the web developer to use in the website, is it possible to send this image in the XML or will he need these picture in a location he can access?
Hope this makes sense.
Don't know if it is this what you need, but SQL-Server's
FOR XML PATH() will encode a binary value as
SELECT 'The Title' AS [@Title] ,'The Name' AS [@Name] ,0x1234567890ABCDEF AS [Base64EncodedBinary] FOR XML PATH('Test');
<Test Title="The Title" Name="The Name"> <Base64EncodedBinary>EjRWeJCrze8=</Base64EncodedBinary> </Test>
Base64-string can be used as
This would need SQL-Server 2008+. Earlier version 2005 encoded binaries to a HEX-string implicitly...