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

Click here to load this message in the networking platform