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!
Unexpected data type 25
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Unexpected data type 25
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:
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
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., 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.
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., 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.
-
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Unexpected data type 25
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.
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.