Board index » delphi » using a MS Access databse with Delphi 5

using a MS Access databse with Delphi 5

Hi,

I need to make a program to in Delphi 5 that uses a MS Access database.
I tried a while, but didn't manage to succeed.
Can anyone give my a small example program or a short desrciption how I do this??

Thanks,
Mark

 

Re:using a MS Access databse with Delphi 5


Use the BDE MSACCESS driver, the BDE ODBC driver or using ADOExpress ?

For the BDE:
- Install DAO 3.0 (part of MS Office 95) or DAO 3.5 (part of MS Office 97).
- Start the BDE Administrator and change Configuration | Drivers | Native |
MSACCESS | DLL32 to match the installed DAO version.
- Add a TDatabase to your application and double-click it.
- Set Name to a unique name and set Driver name to MSACCESS (and NOT
Microsoft Access Driver (*.mdb), because that is the ODBC driver).
- Click the Default button.
- Change DATABASE NAME to the path and name of the .mdb file
- Set USER NAME to Admin and LANGDRIVER to Access General
- Uncheck Login prompt
- Add a TTable to your application.
- Set the DatabaseName property to the Name you entered in the TDatabase
dialog.
- Select a TableName and an IndexName and set Active to True.
- Add a TDataSource and link it to the TTable.
- Add a TDBGrid and link it to the TDataSource.

Quote
"Mark Hage" <M.C.H...@stud.tue.nl> wrote in message

news:2dafcf69.0108170417.38c046b7@posting.google.com...
Quote
> Hi,

> I need to make a program to in Delphi 5 that uses a MS Access database.
> I tried a while, but didn't manage to succeed.
> Can anyone give my a small example program or a short desrciption how I do
this??

> Thanks,
> Mark

Re:using a MS Access databse with Delphi 5


if it is Access 2000, you can't. Delphi can only link to older Access
databases (95 and 97, i think). Use ODBC instead.

Denis

Re:using a MS Access databse with Delphi 5


BDE doesn't work with Access 2000 but the ADO components certainly do.

Personally Id run with ADO rather than BDE any day... Mark, you can setup
ADO components in approximately the same manner as the equivalent BDE ones.
(Ref response to your submission by M.H. Avegaart)

If you don't have win98 or newer then you will need to dowload database
drivers. http://www.microsoft.com/data/download.htm Look for MDAC 6.1. Also,
you should be aware that the Borland site has patches for the BDE and ADO
components that you WILL need.

Have fun :)

Other Threads