Page 1 of 1

Unexpected data type 25

Posted: Fri 22 Mar 2013 01:41
by tracy1080
I am testing dbexpress for Mysql (Delphi 2007).
When I try to call a table with decimal(20,2) field OR
run the SQL : select count(*) from table
it shows error : Unexpected data type 25.

What I should do to avoid this error?
Thanks!

Re: Unexpected data type 25

Posted: Fri 22 Mar 2013 15:46
by DemetrionQ
Hello.

We have already fixed this problem, the fix will be included to the next driver version. We plan to release dbExpress driver for MySQL approximately in a month.
For the time being, to solve the problem, you should set the EnableBCD parameter to False:

Code: Select all

    SQLConnection1.Params.Values['EnableBCD'] := 'False';

Re: Unexpected data type 25

Posted: Sat 23 Mar 2013 02:18
by tracy1080
I have already set the following :
SQLConnection1.Params.Clear;
SQLConnection1.LoginPrompt := False;
SQLConnection1.Params.Values['HostName'] := 'localhost';
SQLConnection1.Params.Values['Database'] := 'DB';
SQLConnection1.Params.Values['User_Name'] := 'user';
SQLConnection1.Params.Values['Password'] := 'aaa';
SQLConnection1.Params.Values['FetchAll'] := 'True';
SQLConnection1.Params.Values['EnableBoolean'] := 'False';
SQLConnection1.Params.Values['EnableBCD'] := 'False';
SQLConnection1.Params.Values['UseUniCode'] := 'True';
SQLConnection1.Params.Values['ServerCharset'] := 'utf8';
SQLConnection1.Open;

However, it stills show the error : Unexpected data type 25

If I use dbExpress driver for MySQL Standard(version 4.20.8), there is no 'Unexpected data type 25'. However, it will have problems if save 'Text' field with chinese character. It also cannot retrive data if the field is varchar(20000). So, I would like to upgrade dbExpress to version 6.

Re: Unexpected data type 25

Posted: Tue 26 Mar 2013 17:35
by DemetrionQ
Hello.

The issue was caused by a Delphi 2007 bug. Using EnableBCD doesn't resolve it, indeed. Bugfix for this problem will be included in the upcoming build.