Borland C++ Builder 6 and MySQL database


How to
Use and access a MySQL database with a Borland C++ Builder 6 application
(A simple table and a table with BLOBs)


If you got drivers/DLL problems, please visit the site : http://www.justsoftwaresolutions.co.uk/delphi/dbexpress_and_mysql_5.html

Using Borland dBexpress for Borland Developer Studio 2006

Just take the libmySQL.dll from the MySQL directory to Windows directory.
Go in c:\Program Files\Borland\BDS\4.0\dbExpress\dbxdrivers.ini , verify that
GetDriverFunc=getSQLDriverMYSQL
LibraryName=dbxmys30.dll
VendorLib=libmysql.dll
HostName=localhost
Database=test
User_Name=root
Password=
BlobSize=-1
username and/orpassword depends on your system
Download the BDS examples.
There are just some slight differences, that I corrected to make the old dbexpress versions work fine with BDS2006.




Download :
mydbexpress.zip   BDS2006 : First example, access to MySQL database, browse table elements
mydbexpressblob.zip   BDS2006 : Second example, use BLOB





Using Borland dBexpress

It is for me much simpler, since you need no extra components (dBexpress is inclued in BCB 6 pro).
You need :
Then you will download the examples and follow the steps :
Compile and execute the code. If everything is ok ;-) you will see your appli :





Download :
mydbexprexemple.zip   First example, access to MySQL database, through dBexpress, browse table elements with BLOB






Using Zeos VCL components

You need :
Then you will download the examples and follow the steps :
Compile and execute the code. If everything is ok ;-) you will see your appli :
ex_1.jpg

Example 2 is similar but it contains Blobs :
Large amount of data like bitmaps and memo text.
Compile and execute the code. Have fun
ex_2.jpg




Download :
myexample1.zip   First example, access to MySQL database, browse table elements
myexample2.zip   Second example, use BLOB
myexamplesql.zip   Initialise database tables for examples 1 and 2


Back to homepage

Last update : 09/04/2006