0

I have desktop application which is in C# and MS Access DB(.accdb)

I have already install the "Ms Access Engine" but i am facing "Error: The ‘Microsoft.Ace.OLEDB.12.0‘ provider is not registered on the local machine" Error.

  • 1) Do you have the same "bitness" (ie 32/64 bit) version of the driver as your application is? 2) Try rebooting after installation, it's not in the instructions but I had to do it on multiple machines to make it work. – Joachim Isaksson May 25 '12 at 18:09
  • Did you see http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/1d5c04c7-157f-4955-a14b-41d912d50a64? – Fionnuala May 25 '12 at 18:12

1 Answers1

0

The first thing you need to check is your build configuration of your application.

  • If you have built your project under x86 platform, then in order to resolve you issue you should install the following packages on your machine:

    1. In order to use the 'Microsoft.ACE.OLEDB.12.0' provider you must install the Microsoft Access Database Engine 2010 Redistributable first, this installation is available at: http://www.microsoft.com/download/en/details.aspx?id=13255 .

      After the installation has complete, try running you application, if this solves the issue great, if not, continue to step 2.

    2. This next step is an unexplained workaround, which works for Office 2010, even though it is the Data Connectivity Components of Office 2007. I am not quite sure why this works, but it does and this has been proven to work in almost all cases. You need to install the 2007 Office System Driver: Data Connectivity Components, this installation is available at: http://www.microsoft.com/download/en/confirmation.aspx?id=23734 .

      After this installation is complete, try running your application, this should resolve the issue.

  • If you are trying to run an application built under x64 or AnyCPU platform, I would recommend first validating that it runs as expected under the x86 platform. In the event that it does not run under that x86 platform, perform the steps in the first part and validate that it runs as expected.

    I did read that the MS Access drivers including the OLEDB Database driver works only under the x86 platform and is incompatible under the x64 or AnyCPU platform. But this appears to be untrue. I validated my application was running when building x86, then I installed the Access Database Engine using the passive flag.

    1. First download the file locally You can download the installation here: http://www.microsoft.com/en-us/download/details.aspx?id=13255
    2. Installing using the command prompt with the '/passive' flag. In the command prompt run the following command: 'AccessDatabaseEngine_x64.exe /passive'

    After these 2 steps I managed to run my application after building in x64 or AnyCPU build configuration. This appeared to solve my issue.

Note: The order of the steps seems to make a difference, so please follow accordingly.

Merav Kochavi
  • 4,223
  • 2
  • 32
  • 37