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

  • Question

  • 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?



    • Edited by asadim Wednesday, March 20, 2013 11:03 PM
    Wednesday, March 20, 2013 10:55 PM

Answers

  • change your platform target from anycpu to x86, the 32 bit edition of the engine you have does not work in 64 bit programs.

    Alternatively you can uninstall every 32 bit Office component, then install the 64 bit editions. You may not have such a choice on customers' machines.



    Visual C++ MVP


    • Marked as answer by asadim Thursday, March 21, 2013 4:49 PM
    • Edited by Sheng Jiang 蒋晟 Thursday, March 21, 2013 7:51 PM
    Thursday, March 21, 2013 3:49 AM

All replies

  • change your platform target from anycpu to x86, the 32 bit edition of the engine you have does not work in 64 bit programs.

    Alternatively you can uninstall every 32 bit Office component, then install the 64 bit editions. You may not have such a choice on customers' machines.



    Visual C++ MVP


    • Marked as answer by asadim Thursday, March 21, 2013 4:49 PM
    • Edited by Sheng Jiang 蒋晟 Thursday, March 21, 2013 7:51 PM
    Thursday, March 21, 2013 3:49 AM
  • As Sheng Jiang mentioned, you have to change the Platform option (Build...Configuration Manager...) in the project to x86 if 32-bit ACE is installed. The only other option would be to install the 64-bit version of ACE instead of the 32-bit version if you want your app to run 64-bit.

    http://www.microsoft.com/en-us/download/details.aspx?id=13255


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Thursday, March 21, 2013 11:59 AM
  • Thanks! That solved the problem.
    Thursday, March 21, 2013 4:48 PM