HOW TO: FIX ERROR - "the 'microsoft.ace.oledb.12.0' provider is not registered on the local machine"

The problem arises when you have your application compiled for AnyCPU Platform, you are running on a 64bit system and the installed ADO.NET provider (Microsoft ACE.OLEDB.12.0) is the 32bit version.



Fig. 1


To resolve the issue, you need 64-bit Windows along with 64-bit MS Office. And download and install "
Microsoft Access Database Engine 2010 Redistributable" from here: 


Another option is to deinstall the 32bit version and install the 64bit version of ACE from hereand then run you application as AnyCPU on 64bit systems. But this could be a nightmare for your deployment scenarios

But wait, there is a simple workaround to resolve the issue.

The simplest workaround is to change the Target Platform of your 64-bit application to 32-bit through Visual Studio menu

BUILD -> Configuration Manager -> Active Solution Platform -> x86

Fig. 2



Fig. 3


If the x86 option is not already there, then select NEW, name it x86Copy Settings from AnyCPUand check Create new project platforms

Fig. 4


Enjoy the programming with this simple workaround.

Comments

  1. Does this work in a 32-bit computer?

    ReplyDelete
    Replies
    1. If u have 32-bit computer, then the issue will NOT occurred as U have 32-bit version application and 32-bit version Microsoft.ace.oledb.12.0. :)

      Delete

Post a Comment

Popular posts from this blog

Data Bound Controls in ASP.Net - Part 4 (FormView and DetailsView controls)

ASP.net: HttpHandlers

The Clickjacking attack and X-Frame-Options