You can use Microsoft Access databases only with Delphi 3 Professional or better. You have to have the BDE (Borland Database Engine) installed on the PC. It should be version 4.51 or better. Besides the BDE you need to have the DAO installed. It is part of MS Office 97. The distribution version should be on the Office CD.
After installing the BDE you should run the BDE Administrator and click on the Configuration tab. Find the setting Configuration/Drivers/ Native/MSACCESS. Change the value of DLL32 from iddao32.dll to idda3532.dll.
Now to use a Microsoft Access database create and alias in the DatabaseDesktop or create a TDatabase component and next set the following values (the database name and the database file location are just examples :-):
...
with Database1 do begin
DriverName := 'MSACCESS';
DatabaseName := 'SomeNameDB';
with Params do begin
Clear;
Add('DATABASE NAME=c:Database directorydatabase.mdb');
end;
Connected := True;
end;
...
For every used TQuery or TTable component you have to set the value of the DatabaseName property to be the same as
Database1.DatabaseName.
Tags: access mdb, add database, bde administrator, bde borland database engine, borland database engine, configuration tab, database name, distribution version, dll, dll32, microsoft access databases, msaccess, office cd, tdatabase component, ttable component
Merlin’s Delphi Forge
Leave a comment