enum field value error

enum field value error

Postby 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
 

Postby 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'
ysyang
 

Postby Guest » Tue 03 May 2005 15:06

I'm use TMyQuery :D
Guest
 

Postby 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.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby 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'
ysyang
 

Postby 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.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components