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

  • Question

  • User938738290 posted

    I connect to a .xlsx file like so:

    string lFileConnectionString = String.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0 Xml;HDR=No;'", lFile.FullName);
    using (Database lXlsx = Database.OpenConnectionString(lFileConnectionString, "System.Data.OleDb"))
        // ...

    I've been working on this program for about three weeks now, successfully querying into the file, and that line hasn't changed since day 1.  However, as of this morning, I'm getting the error in the thread title whenever I try to run any query on the file. ("The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.")

    I found this thread (https://social.msdn.microsoft.com/Forums/en-US/1d5c04c7-157f-4955-a14b-41d912d50a64/how-to-fix-error-the-microsoftaceoledb120-provider-is-not-registered-on-the-local-machine?forum=vstsdb).  I can't install the x64 version of the 2010 redistributable on account of my copy of office being x86, and I don't think I should need to go through the "Add data source" wizard in VS, seeing as this was already working until this morning.

    Does anyone know how my ACE provider got un-registered from my machine, and how to re-register it?

    Monday, October 27, 2014 11:38 AM

All replies