Page 1 of 1
varbinary in MySql
Posted: Thu 28 Jul 2011 13:10
by chkaufmann
Hi,
I try to read from a Mysql table with varbinary(255) columns.
The fieldtype is set to ftLargeint in the TUniQuery field.
Is this a mistake in UniDac? Or do I have to set any special option for this?
cu Christian
Posted: Thu 28 Jul 2011 13:50
by AndreyZ
Hello,
Please specify the following:
- the exact SQL statement you are using in the TUniQuery component;
- the exact version of MySQL server;
- the exact version of UniDAC. You can learn it from the About sheet of TUniConnection Editor.
Posted: Fri 29 Jul 2011 08:54
by chkaufmann
I found the solution:
query.SpecificOptions.Values['BinaryAsString'] := 'False';
then I get VARBINARY as binary fields.
cu Christian
Posted: Mon 01 Aug 2011 07:41
by AndreyZ
The BinaryAsString property is used to specify a method of representation of the BINARY and VARBINARY fields. If it is set to True, these fields will be represented as string fields, otherwise, as TBytesField and TVarBytesField correspondingly. In your first post you wrote that the VARBINARY fields were detected as ftLargeint fields. Can you reproduce such UniDAC behaviour? If yes, please provide me all the information I asked in my previous post.
Posted: Wed 03 Aug 2011 05:17
by chkaufmann
AndreyZ wrote:In your first post you wrote that the VARBINARY fields were detected as ftLargeint fields. Can you reproduce such UniDAC behaviour?
Using "BinaryAsString" option, the DataType for VARBINARY is as expected (ftVarBytes).
cu Christian