Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String to byte array
Message
From
15/10/2008 18:09:14
Valter Molina
Molina & Nardi Ltda
Brazil
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
String to byte array
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MySQL
Miscellaneous
Thread ID:
01355261
Message ID:
01355261
Views:
73
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?
Next
Reply
Map
View

Click here to load this message in the networking platform