Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server field type to store .pdf file (Part II)
Message
De
03/08/2004 13:39:29
 
 
À
03/08/2004 13:15:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00930283
Message ID:
00930442
Vues:
21
>Gregory,
>
>>The only idea left I have is to use a text/varchar field and put the pdf file through a bas64 encoding prior to storing it
>
>Do you happen to know how that can be done? (I mean the bas64 encoding)
>
>This seems to point to the same thing as Daniel Gramunt told me to do (message #920950) but I couldn't try because hadn't FoxCrypto.fll.
>
>Fernando

Fernando,

from vfp8: strconv(..., 13) and strconv(..., 14) see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_foxhelp/html/err2026.asp

Maybe it's in vfp7 sp1

for an explanation : http://www.ietf.org/rfc/rfc2045.txt

Base64 does not leave unprintable chars (ie outputs text basically), whereas the pdf (if compressed) has binary data


re vfp6, this seems to work, = to base64 (code from Rick Strahl)
loXML = CREATEOBJECT("MSXML2.DOMDocument")
loXML.loadXML("<node></node>")
loNode = loXML.DocumentElement
loNode.dataType = "bin.base64"
loNode.nodeTypedValue =  CREATEBINARY("Aladdin:open sesame") && filetostr(..pdf)
?loNode.Text  && QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform