enum field value error

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ysyang

enum field value error

Post by ysyang » Tue 03 May 2005 15:01

I'm using D6, MyDac 3.50.20,
MySQL 3.23.56 , MySQL 4.1.x and MySQL 5.0

I'm create table of named 'test'

CREATE TABLE `test` (
`id` enum('1','2','3','4','5','6','7','8','9','10') default NULL
) TYPE=MyISAM COMMENT='test '

SQL = 'Desc test';

Result value is enum('1','2','3','4','5','6','7','8','9'
this invalid value.

Valid result values is enum('1','2','3','4','5','6','7','8','9','10')

what problem ?
what

ysyang

Post by ysyang » Tue 03 May 2005 15:05

MySQL 3.23.56
Result value is enum('1','2','3','4','5','6','7','8','9'
'Type' field class = 'TStringfield'

MySQL 4.1.x
Result value is enum('1','2','3','4','5','6','7','8','9'
'Type' field class = 'TStringfield'

MySQL 5.0
Result value is enum('1','2','3','4','5','6','7','8','9','10')
'Type' field class = 'TMemoField'

Guest

Post by Guest » Tue 03 May 2005 15:06

I'm use TMyQuery :D

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 04 May 2005 10:55

> Result value is enum('1','2','3','4','5','6','7','8','9'

Please specify how you get this Result.

In general, for ENUM fields MySQL often returns incorrect field dimension.

ysyang

Post by ysyang » Thu 05 May 2005 07:44

with QTemp do
begin
Close;
SQL.Clear;
SQL.Add('desc test');
Open;
End;

Using MyDAC and TMyQuery

MySQL 3.23.56
'Type' field value = enum('1','2','3','4','5','6','7','8','9' '
Type' field class = 'TStringfield'

MySQL 4.1.x
'Type' field value = enum('1','2','3','4','5','6','7','8','9'
'Type' field class = 'TStringfield'

MySQL 5.0
'Type' field value = enum('1','2','3','4','5','6','7','8','9','10')
'Type' field class = 'TMemoField'


but not happen error when using 'MyComponents' of 'scibit' company
and 'DAC for MySQL' of microOLAP




--------------------------------------
Another Sample

with QTemp do
begin
Close;
SQL.Clear;
SQL.Add('show columns from test');
Open;
End;

Using MyDAC and TMyQuery

MySQL 3.23.56
'Type' field value = enum('1','2','3','4','5','6','7','8','9','10')
'Type' field class = 'TStringfield'

MySQL 4.1.x
'Type' field value = enum('1','2','3','4','5','6','7','8','9','10')
'Type' field class = 'TStringfield'

MySQL 5.0
'Type' field value = enum('1','2','3','4','5','6','7','8','9','10')
'Type' field class = 'TMemoField'

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 05 May 2005 12:13

Thank you for information.
We reproduced your problem and fixed it. This fix will be included in the next MyDAC build. It will be available in about one month.

Post Reply