Unexpected data type 25

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
tracy1080
Posts: 5
Joined: Thu 21 Mar 2013 14:41

Unexpected data type 25

Post by tracy1080 » Fri 22 Mar 2013 01:41

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!

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Unexpected data type 25

Post by DemetrionQ » Fri 22 Mar 2013 15:46

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';

tracy1080
Posts: 5
Joined: Thu 21 Mar 2013 14:41

Re: Unexpected data type 25

Post by tracy1080 » Sat 23 Mar 2013 02:18

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.

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: Unexpected data type 25

Post by DemetrionQ » Tue 26 Mar 2013 17:35

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.

Post Reply