Scenario :
- I convert a pdf file to base64 and put it in an xml, and
Problem :
- when I receive the xml I will have to convert this base64 data back to the original pdf file using SQL Server and store it somewhere.
I
found this link but could not figure out how to do it.
This is
what I have:
DECLARE
@SQLcommand VARCHAR(8000),
@MyOriginalFile VARCHAR(8000),
@RawData VARCHAR(8000)
SET @RawData = 'JVBERi0x etc'
SET @SQLcommand = 'bcp "SELECT @MyOriginalFile = @RawData" queryout "\\MY-SERVER\MySharedFolder\New.pdf" -T -n -S A70195\dev'
EXEC xp_cmdshell @SQLcommand
- I think I need to understand what does the -T -n -S A70195\dev mean.
Can someone please help?
Thanks.