'Microsoft.ACE.OLEDB.12.0' provider is not registered -but it is

13,759

I can think of two scenarios that could explain your issue:

  1. Your C# project is set to target both 64-bit and 32-bit platforms and the 64-bit machine has only the 32-bit version of the Access Database Engine installed. The reference fails because the program is running as 64-bit but the machine is missing

    C:\Program Files\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLL

  2. Your C# project is set to target 32-bit platforms only (x86) and the 64-bit machine has only the 64-bit version of the Access Database Engine installed. The reference fails because the program is running as 32-bit but the machine is missing

    C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\ACEOLEDB.DLL

Note that the installer for the 64-bit version of the Access Database Engine installs just the 64-bit version, not both.

Share:
13,759
Mossi
Author by

Mossi

Updated on June 04, 2022

Comments

  • Mossi
    Mossi almost 2 years

    Short and sweet:

    • app works on x86 machine but not on x64 (tried on a 2008 Server and a Windows 8)
    • Microsoft Access Database Engine 2010 already installed (also have Microsoft Office 2007 Access Database Engine installed)
    • MS Office not installed
    • confirmed the existence of C:\Program Files (x86)\Common Files\microsoft shared\OFFICE12\ACEOLEDB.DLL

    Code:

    string conn = "Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;";
    OleDbConnection _connOle = new OleDbConnection(conn);
    

    Any ideas what I should do to get this app to work on the x64 machines? Thanks!