简体   繁体   中英

The dreaded 'Microsoft.ACE.OLEDB.12.0' provider is not registered in Visual Studio 2017

I am receiving the error "'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine" when performing the following steps:

  1. start visual studio 2017 community
  2. from menu bar choose: tools | connect to database
  3. from dialog choose: Microsoft Access Database File (OLE DB)
  4. browse to access 2013 database file
  5. click "test connection"

I realize there are many other posts regarding this issue but I have reviewed many of them and tried solutions listed to no avail.

I have the following installed:

  • Microsoft Access 2013 x64
  • Microsoft Access database engine 2016 x64
  • Microsoft Access Runtime 2013 x64

Running the following powershell script seems to confirm the driver is installed:

PS C:\Users\zwrm1> (New-Object system.data.oledb.oledbenumerator).GetElements() | select SOURCES_NAME, SOURCES_DESCRIPTI
ON

SOURCES_NAME               SOURCES_DESCRIPTION
------------               -------------------
SQLOLEDB                   Microsoft OLE DB Provider for SQL Server
MSOLAP                     Microsoft OLE DB Provider for Analysis Services 11.0
MSOLAP                     Microsoft OLE DB Provider for Analysis Services 11.0
MSDataShape                MSDataShape
SQLNCLI11                  SQL Server Native Client 11.0
Microsoft.ACE.OLEDB.12.0   Microsoft Office 12.0 Access Database Engine OLE DB Provider
Microsoft.ACE.OLEDB.15.0   Microsoft Office 15.0 Access Database Engine OLE DB Provider
Microsoft.ACE.OLEDB.16.0   Microsoft Office 16.0 Access Database Engine OLE DB Provider
ADsDSOObject               OLE DB Provider for Microsoft Directory Services
SQLNCLI11 Enumerator       SQL Server Native Client 11.0 Enumerator
Windows Search Data Source Microsoft OLE DB Provider for Search
MSDASQL                    Microsoft OLE DB Provider for ODBC Drivers
MSDASQL Enumerator         Microsoft OLE DB Enumerator for ODBC Drivers
SQLOLEDB Enumerator        Microsoft OLE DB Enumerator for SQL Server
MSDAOSP                    Microsoft OLE DB Simple Provider
MSOLAP                     Microsoft OLE DB Provider for Analysis Services 13.0
MSOLAP                     Microsoft OLE DB Provider for Analysis Services 13.0

How can I fix this error and successfully open my access database in visual studio 2017 community?

Thanks for any thoughts, zwrm1

It seems Visual Studio 2017 is a 32 bit application and can only "see" 32 bit data sources.

I was unable to install 32 bit drivers in a straight forward fashion because the 32 bit installer for the drivers won't let you run it if you have 64 bit office installed (which I do, and I don't want to go back to 32bit office).

However, from other posts I realized that the 32 bit 2010 Access Runtime package can install alongside 64 bit office if one uses the /passive flag. (FWIW, I think I tested the 2013 access runtime package first and was unable to get it to install 32 bit drivers alongside the 64bit drivers).

Once I got the 32 bit drivers installed VS was able to see my data sources and everything works well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM