General information
Category:
Coding, syntax & commands
Title:
String to byte array
Environment versions
Network:
Windows 2003 Server
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only