Jump to content
Squall_FF8

Connecting to MS Access (.accdb) in Delphi 12

Recommended Posts

Hi guys,

I'm trying to connect my application to MS Access DB. If the file is with ".mdb" format - everything works fine.

However I need to use the "accdb" and so far - nothing worked (ADO/FD connection).
Can you advise how to do it?

 

P.S. if it matters, I will need read/write to DB, but no exclusive. 

Share this post


Link to post
21 hours ago, dummzeuch said:

You need the Access Database Engine 2012 (or later, if it exists).

I don't remember where I got it from, but a quick Google search just gave me this link to Microsoft.

Thank you for your response!

It seems the problem is much bigger then I thought. I did quite some digging and tests and here is short summary:
1. [Windows] ODBC keep two separate sets of providers for 32/64 bit.
2. [Windows] Depending on the version of your app, you can use only one set.

3. [Windows] Natively, in 32 version you can handle only the old (.mdb) Access format.
4. [MS Office] If you have Office installed, you are stuck with whatever version you had installed. Not 100% sure, but latest versions are x64 only.

5. [MS Office] That means, I cant install the drivers in the link. Not without removing the Office first!

6. [Delphi] Comes as 32 bit application! That mean in Design time, you can set connections only for 32bit set.

7. [Delphi] For 64 bit, runtime ONLY setup!

Good luck juggling all above to deliver a seamless application to your clients ...

Edited by Squall_FF8

Share this post


Link to post
3 hours ago, Squall_FF8 said:

Good luck juggling all above to deliver a seamless application to your clients ...

That's why they pay us the big bucks 🙂 

 

Here's some links that might be relevant:

https://learn.microsoft.com/en-us/office/troubleshoot/access/cannot-use-odbc-or-oledb

https://how-to.aimms.com/Articles/129/129-MSACCESS-32bit-64bit.html

  • Thanks 2

Share this post


Link to post
8 hours ago, Anders Melander said:

Hehehe, nice one 🙂
Thank you for the links! I'm sure they will come in handy (the download in the second one doesnt work). Especially I would like to try the "/passive" trick with 2013 or 2016 32 bit drivers. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×