Kylix and Delphi
 
Click here to produce a printer friendly page
Printer Friendly Page


Home

Short Articles
 WYLUG
 Tele 2
 MySQL, Kylix and Delphi Too.

Software
 NURBS Toolbox

Articles
 Printer Friendly Pages

Misc
 Chantico
 
MySQL, Kylix and Delphi too.

Having purchased Kylix and Delphi 6 last week for some proposed cross platform development, I hit problems with using dbExpress for MySQL connections. I thought I might share my experiences and discoveries.

Connection to the database using the dbExpress components is via TSQLConnection. The first problem was that the Vendor Library is set to load libmysqlclient.so.6.0.0

The current stable version of MySQL is 3.23 release 38 which has been around now for quite some considerable time and is very stable. However MySQL-3.23.xx uses libmysqlclient.so.10.0.0. The previous stable version og MySQL 3.22 uses the libmysqlclient.so.6.0.0, but we change from this version sometime ago. Why? Because the lastest version 3.23 is now open source, stable, with numerus performance and feature increases, and the windows port of MySQL is also freely available, where as 3.22 for windows is still under commericial license and distributed as shareware.

So first I tried to set the the VendorLib of the component to version 10 of the library. This is set by changing a configuration line in the file dbxdrivers. However, although I could connect to the database had problems with ALL the other dbExpress components. In instance TSQLTable will lock up if you try to choose a table by connecting a design time.

So I bit the bullet and decided if the mountain won't come to me I'd better go to the mountain, and re-installed MySQL back one version to 3.22. o.k. on one of the database servers all now works.

Next I start work with delphi 6 the TSQLConnection component work using the same principles, but the VendorLib is libmysql.dll. Oh, yes I think this should talk to both 3.22 and 3.23 versions of the database. The reason is that libraries for 3.23, should be capable of talking to 3.22, for instance you can use libmysqlclient.so.10 in linux to connect to a 3.22 database. However when I tried Delphi 6 it would only connect to a local database on localhost and not any remote ones, and even then many of the components would either refuse to work or again in design mode all table and field list where empty.

Thinking this though, if Kylix is using libmysqlclient.so.6 and not 10, prehaps I need a libmysql.dll from an shareware copy of MySQL, I tried it and it worked :-)

The story then is simple Borland have design dbExpress ONLY to work with MySQL-3.22.xx and not the latest recommend stable version, why I do not know, but their you are. Can you find this information on any of their web sites or in the documentation NO!

By the way since solving this problem I've found a website by James R. Knowles that has also lists his experiences with Kylix, a very good and interesting read (he also found this problem)

http://www.ifm-services.com/people/jamesk/kylix/adv_in_kylix-1.html

 
    ARIA - is a Mark Spink Production Copyright © 2000
All Rights Reserved.
Email: dmspink@aria.uklinux.net