Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String to byte array
Message
De
16/10/2008 05:07:52
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
15/10/2008 18:09:14
Valter Molina
Molina & Nardi Ltda
Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MySQL
Divers
Thread ID:
01355261
Message ID:
01355313
Vues:
23
>I need to create a byte array from a string. I am reading a PDF file as a low-level to store it in ADO connection to MySQL.
>If I store the string do the blob field it doubles the size each time I use
>ADOrs3.FIELDS("jornal").AppendChunk(PDFarquivo )
>For example. I open the connection to MySQL and Recordset.
>ADOrs3.Addnew to create a new record.
>I open a low-level file handel to the PDF file.
>I read the first 1000 bytes from the file into the memory variable PDFarquivo and then AppendChunk it.
>When I check ADOrs3.FIELDS("jornal").Actualsize, it returns 2000.
>When the loop ends, the Actualsize is 2 times the original PDF size.
>How can I prevent this to happen?
myByteArray = createbinary( m.myString )
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform