 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Max Wright Guest
|
Posted: Fri Jun 16, 2006 6:06 pm Post subject: MySQL binary fields |
|
|
What is the best way to read and write fields defined as BINARY in
MySQL?
I am using the BDE with MySQL's ODBC driver. The fields are identified
by BCB(4) as TStringFields, but reading and writing via AsString doesn't
work if the data contains zero-value bytes.
I've also tried using instances of TBinaryField and TBytesField but when
I do this I get a "type mismatch for field 'data', expecting: Unknown
actual: FixedChar."
I can translate the binary data into a character string that can be used
in SQL insert or update statement, and this gets the correct data into
the database, but all attempts to get it out again fail at the first
zero byte.
Am I missing something obvious here?
- Max Wright |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|