'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine - cSharp Coder

Latest

cSharp Coder

Sharp Future

Friday, July 1, 2022

'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

 Well, you need to install it. You're looking for:


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.

No comments:

Post a Comment