jl2001
asked on
How to use MS Access database for Delphi 6?
Hi, Experts.
Could you please tell me how How to use MS Access database for Delphi 6?
I created a database call "test.mdb" using MS Access. I created an alias in the database desktop and chose driver type as "MSACCESS" and path is "c:\copy\test.mdb"; But when click on "connect" button, it said: "unrecognised database format".
Thanks.
Could you please tell me how How to use MS Access database for Delphi 6?
I created a database call "test.mdb" using MS Access. I created an alias in the database desktop and chose driver type as "MSACCESS" and path is "c:\copy\test.mdb"; But when click on "connect" button, it said: "unrecognised database format".
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello
BDE support MS Access 97 and previous versions, if you want to use MS Access 2000 and later, you have to use ADO, and I prefer ADO it cuz it's faster than BDE, to use ADO in ur project:
1. Drop ADOTable on your form from ADO Tab.
2. Press on the ConnectionString Property for the ADOTable> then build
3. from provider window choose "Microsoft Jet 4.0 OLE DB Provider", then press Next
4. from the connecion window, and select ur MDB file, and check on the Allow saving passoword, and blank password, then press test connection to see it the connection succeeded, then press ok > ok, and back to the form
5. Now just choose your from from the TableName property of the ADOTable.
I hope that work fine with you
Best regards
Mohamemd Nasman
BDE support MS Access 97 and previous versions, if you want to use MS Access 2000 and later, you have to use ADO, and I prefer ADO it cuz it's faster than BDE, to use ADO in ur project:
1. Drop ADOTable on your form from ADO Tab.
2. Press on the ConnectionString Property for the ADOTable> then build
3. from provider window choose "Microsoft Jet 4.0 OLE DB Provider", then press Next
4. from the connecion window, and select ur MDB file, and check on the Allow saving passoword, and blank password, then press test connection to see it the connection succeeded, then press ok > ok, and back to the form
5. Now just choose your from from the TableName property of the ADOTable.
I hope that work fine with you
Best regards
Mohamemd Nasman
Sorry Motaz, I open the page before you post ur comment
Don't worry Mohammed, the good thing that we have the same thoughts:)
Motaz
Motaz
ASKER
Thanks all! Your comments are very helpful. But I can only choose one for the answer.
Thanks again!
Thanks again!
I recommend that you make an ODBC connection to your database, which will make it automatically accessible from your BDE based applications, without the need to define an alias for it.
A second solution that I actually prefer is, using ADO connection, which is available in both Delphi 6 and 5.
If you need more help, please let me know.
Regards,