Problem: Borland's dbExpress development has come to a halt since Delphi 7. Only MySQL 3.23 and 4.0 are supported.
Solution: Someone has written an open source 4.1 and 5.0 driver here:
http://www.justsoftwaresolutions.co.uk/delphi/dbexpress_and_mysql_5.html
It works really well. Here are the instructions:
Copy the DLL somewhere on your path. You will also need an appropriate (V5.0)
libmysql.dll on the path.
If you're setting your dbexpress stuff up in the IDE, append the contents of the
.ini files to the existing ones of the same name in your Delphi installation.
If you're setting up the dbexpress stuff programmatically, then you need
something like:
var
Connection: TSQLConnection;
begin
Connection := TSQLConnection.Create(nil);
Connection.DriverName := 'dbxmysql';
Connection.GetDriverFunc := 'getSQLDriverMYSQL50';
Connection.LibraryName := 'dbxopenmysql50.dll';
Connection.VendorLib := 'libmysql.dll';
Connection.Params.Append('Database=NAME_OF_DATABASE);
Connection.Params.Append('User_Name=NAME_OF_USER');
Connection.Params.Append('Password=PASSWORD');
Connection.Params.Append('HostName=localhost');
// ... do stuff
Connection.Free;
end;
Edited 1 time(s). Last edit at 04/09/2006 02:25AM by igdsoftware.