Solved: “The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine” error when connecting to Access via C#

As you want to connect Microsoft Access database on Visual Studio (by clicking “Connect to Database” button on “Server Explorer” console), you may face this error:

“The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine”

Incompatiblity error between Office and Visual Studio
Incompatiblity error between Office and Visual Studio

Cause

This error shows up because your Operating System and Office installation have different platform types (32bit, 64bit). It ends up with different Visual Studio platform type.

Solution

Follow these steps:

  • On Visual Studio, follow Project > Properties > Build. Change “Platform target” to “Any cpu

    Platform type
    Platform type
  • Install either of them:
    2007 Office System Driver: Data Connectivity Components
    Microsoft Access Database Engine 2010 Redistributable

Leave a Reply