using a MS Access databse with Delphi 5 
Author Message
 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



Tue, 03 Feb 2004 20:17:49 GMT  
 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:
> 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



Tue, 03 Feb 2004 21:35:12 GMT  
 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



Tue, 03 Feb 2004 22:39:04 GMT  
 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 :)



Wed, 04 Feb 2004 08:36:31 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Delphi to an open Access databse

2. Deleting a detail record using Delphi 1.0 on a MS Access 2.0 database

3. Creating an MS Access DB using ADO Express/Delphi 5

4. Using MS Access with delphi 3

5. Using MS-Access OLE fields from Delphi 3

6. Need advise using Delphi with MS Access

7. Need advise using Delphi with MS Access

8. Using explicit transactions in Delphi 2.0 and Ms Access

9. Using MS Access 2.0 db's via ODBC from Delphi v1.0 with transactions

10. MS Access Pros and Cons of using VB vs DELPHI

11. Create MS Access dbase using Delphi

12. Db.StartTransaction in Delphi 2.01 using MS Access 7.0 ODBC Driver fails

 

 
Powered by phpBB® Forum Software