Hello CoreLab-Team,
after updating to the latest dbexpress-driver, tmemo-fields have a '00' value at the end of an updated or inserted memo-value (mysql-type 'TEXT'). So If I search in this memo with a statement like "... where field Like '%.exe' "
the query-result is empty. If i remove this trailing '00' with a database-tool the sql-statement works fine again. Any fast help is highly appreciated.
best regard
sebastian
'00'-terminated strings in MemoFields
Hi Antaeus,
thank you for your fast reply. Yes, the statement is executed at the server's side. How the query performs with a trailing '00' at the end of the fieldvalue is not the problem. The problem is that there is a trailing '00' appended to each memo-string when you update a field. The command line-tool mysql.exe does not do that. (I am refering to mysql 5.0.45 community-nt on windows or 5.0.38-Ubuntu_0ubuntu1.1; its the same behaviour on both)
If i execute a statement like "UPDATE Table SET strDescription = 'teststring' " when Field 'strDescription' is of type 'TEXT' i do not have a trailing '00 neither at windows-mysql nor linux-mysql.
But if i call ApplyUpdates on a clientdataset (using latest CoreLabs dbExpress-Drivers to access a linux or windows-mysql) that maps the column 'strDescription' to a TMemoField and assign TMemoField.Value := 'teststring' i do have a trailing '00' at the updated value. It really looks like a C-string-issue and someone forgot to write len-1 instead of len into the buffer.
Thanks for your help,
with regards
sebastian
thank you for your fast reply. Yes, the statement is executed at the server's side. How the query performs with a trailing '00' at the end of the fieldvalue is not the problem. The problem is that there is a trailing '00' appended to each memo-string when you update a field. The command line-tool mysql.exe does not do that. (I am refering to mysql 5.0.45 community-nt on windows or 5.0.38-Ubuntu_0ubuntu1.1; its the same behaviour on both)
If i execute a statement like "UPDATE Table SET strDescription = 'teststring' " when Field 'strDescription' is of type 'TEXT' i do not have a trailing '00 neither at windows-mysql nor linux-mysql.
But if i call ApplyUpdates on a clientdataset (using latest CoreLabs dbExpress-Drivers to access a linux or windows-mysql) that maps the column 'strDescription' to a TMemoField and assign TMemoField.Value := 'teststring' i do have a trailing '00' at the updated value. It really looks like a C-string-issue and someone forgot to write len-1 instead of len into the buffer.
Thanks for your help,
with regards
sebastian