embedded MySQL invalid fieldtype on enum fields

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
AngelusB
Posts: 11
Joined: Tue 20 Jan 2009 11:17

embedded MySQL invalid fieldtype on enum fields

Post by AngelusB » Sun 03 May 2009 13:23

Working with Delphi 2009, dbexpmda40.dll (version 4.40.0.15), libmysqld.dll (no version known, size 3444 kB, date 2005-03-24)

CREATE TABLE `test` (
`aId` int(11) NOT NULL auto_increment,
`aEnum` enum('N','J') NOT NULL default 'N',
PRIMARY KEY (`aId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

insert into `test` values(null,'J');

The query "select aId from test" is working correct, but "select aEnum from test " gives an error : invalid field type.
Same error when selecting all columns: "select * from test".

I got this problem while porting an application from Delphi 2007 to Delphi 2009. I didn't have problems with enum-fields in Delphi 2007.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 05 May 2009 08:46

I can not reproduce the problem. Please specify the exact version of your Embedded server.
Please check if the problem still persists with MySQL Embedded server version 5.1.22.

AngelusB
Posts: 11
Joined: Tue 20 Jan 2009 11:17

Post by AngelusB » Sat 23 May 2009 15:55

I tried libmysqld.dll version 5.1.34. The demo in C:\Program Files\Devart\DbxMda\Demos\Win32\Embedded gives a set of error messages:
A call to an mysql_server_init failed
Access violation ... in module 'ntdll.dll" etc.

- .. data\mysql.sym : the system can't find the file
- .. data\ibdata1 : the file already exists
- .. data\ib_logfile0 : the file already exists
- .. data\ib_logfile1 : the file already exists

(some messages were in Dutch, I made a translation)

It seems this dll brings me further away.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 25 May 2009 07:08

To solve the problem try to delete all database files (as ib_logfile0, ibdata1, etc.) and recreate the database.

AngelusB
Posts: 11
Joined: Tue 20 Jan 2009 11:17

Post by AngelusB » Mon 25 May 2009 17:20

I made a (empty) file mysql.sym in \data.
(If I don's make this file the application keeps asking for it)
I deleted ibdata1, etc.
But I still get an error message:
A call to an mysql_server_init failed
Access violation at address 7C91B21a in module 'ntdll.dll'. Write of address 00000010

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 27 May 2009 08:10

Please make sure that you use the "share" folder corresponding with the libmysqld.dll version.
Copy the "share" directory from the MySQL server directory version 5.1.34 to "Embedded".

AngelusB
Posts: 11
Joined: Tue 20 Jan 2009 11:17

Post by AngelusB » Thu 28 May 2009 08:24

For as far I can see now: this solved the problems. Thank you verry much.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 28 May 2009 09:38

It is good to see that this problem has been solved. If any other questions come up, please contact me.

Post Reply