3

I try to connect .accdb file as a data source to my Windows Form application in Visual Studio. It keep saying the Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine.

Error screenshot plus listed OleDb enumeratos

I have installed all the recommended runtimes on related Answers marked as Accepted/working:

  • Microsoft Access database engine 2010 (x64)
  • Microsoft Access database engine 2016 (x64)
  • Microsoft Access Runtime 2010 (x64)
  • Microsoft Access Runtime 2013 (x64)

but still the same issue.

Setting the x86/x64 platform in Windows Forms project did not help.

Setup:

  • Microsoft Windows 10 64-bit Version 1809 build 17763.437
  • Microsoft Visual Studio 2015 14.0.25431.01 Update 3
some_other_guy
  • 3,364
  • 4
  • 37
  • 55
michaltadeas
  • 191
  • 1
  • 1
  • 6
  • Did you see this question: https://stackoverflow.com/questions/6649363/microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine – BankBuilder Apr 17 '19 at 15:32
  • Yes, I did, and installing Microsoft Access Database Engine 2010 did not help and changing Target CPU in Project from AnyCPU to x86 and to x64 did not help. – michaltadeas Apr 18 '19 at 06:15

3 Answers3

16

There really is strange mixture of platforms. I have installed all the necessary available within 64 bit and the connection resulted in "The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine".

When I tried to install the 86 bit version, I got the "You cannot install the 32-bit version of Microsoft Access Database Engine because you currently have 64-bit Office products installed...": Setup Runtime error

I followed the Merav Kochavi's advice to run the also the 32 bit version setup using /passive parameter ("AccessDatabaseEngine.exe /passive") and it went without the error message and now IT WORKS! Test connection succeeded.

Thank you all for help!

michaltadeas
  • 191
  • 1
  • 1
  • 6
  • If you are using MS Office, which is 365 in my case, you will then get into infinite loop with version mismatch [screenshot](https://imgur.com/FWiSohb) - could not install 64-bit because of 32-bit installed > install 32-bit > could not install 32-bit because of 64-bit installed loop. – michaltadeas Apr 18 '19 at 08:43
  • Help me a lot, Nobody told me about the same, everyone stated for installation of `Microsoft.ACE.OLEDB.12.0 provider`, but that saves my life almost after 8 hrs, able to resolve the issue.Thanks – Neeraj Dubey Dec 09 '19 at 18:50
  • Installing with /passive worked for me, after the computer was upgraded to Office 365. – Justin Dec 11 '19 at 21:54
  • This is what fixed it for me. Thanks for relaying the info. – mariocatch Mar 04 '20 at 19:54
1

If it helps anyone else, I was having the same issue. One Project would work, but not the other. I went to Add/Remove Programs, Uninstalled Microsoft Access database engine 2010. Then I reinstalled it with the MSI (NOT the 64 bit one). Here is the link to MSI: https://www.microsoft.com/en-us/download/details.aspx?id=13255

Lastly, in VS, still make sure that you click Project, Properties and check the box for Prefer 32-bit. Cheers!

Chuck D
  • 11
  • 2
1

As long as you check the Prefer 32-bit option, this problem is overcome if you have run the Microsoft Access database engine 20xx.exe file to register the engine.

shivlal kumavat
  • 868
  • 1
  • 12
  • 28
John Coyle
  • 11
  • 1