Page 1 of 1

enum field value error

Posted: Tue 03 May 2005 15:01
by ysyang
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

Posted: Tue 03 May 2005 15:05
by ysyang
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'

Posted: Tue 03 May 2005 15:06
by Guest
I'm use TMyQuery :D

Posted: Wed 04 May 2005 10:55
by Ikar
> 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.

Posted: Thu 05 May 2005 07:44
by ysyang
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'

Posted: Thu 05 May 2005 12:13
by Ikar
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.