Microsoft ACE OLEDB
provider not registered
local machine error
database connection
troubleshooting

Fix: 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

Codemia Knowledge Hub ·

This error means the application cannot find an ACE OLE DB provider it can load. Either the Microsoft Access Database Engine is not installed, or it is installed with a different architecture (32-bit vs. 64-bit) than the application. Install the redistributable and make the bitness match, for example by changing the project's platform target.

Microsoft.ACE.OLEDB.12.0 is an OLE DB (Object Linking and Embedding, Database) provider that reads and writes Microsoft Office files such as Access databases (.mdb, .accdb) and Excel spreadsheets (.xls, .xlsx) without opening the Office applications. The error typically appears in .NET applications that connect to Access or Excel files through it.

Causes

  1. Provider not installed: the Microsoft Access Database Engine (ACE), which supplies the provider, is not on the system.
  2. Architecture mismatch: the application's architecture (32-bit or 64-bit) differs from the installed ACE OLE DB provider.
  3. Permission issues: the current user lacks the permissions needed to use the provider.
  4. Corrupted installation: the ACE OLE DB provider installation is damaged.

Fixes

Install the Access Database Engine

Install the Microsoft Access Database Engine Redistributable, which includes the ACE.OLEDB.12.0 provider, choosing the version that fits your system's architecture:

  • The 2007 and 2010 redistributables, which originally shipped the provider, have been removed from Microsoft's download site.
  • Look for the current "Microsoft Access Database Engine Redistributable" on the Microsoft Download Center or Microsoft Learn, and pick the 32-bit or 64-bit installer to match your application.

After installing, confirm that the provider name your connection string uses (Microsoft.ACE.OLEDB.12.0 or a newer one such as Microsoft.ACE.OLEDB.16.0) is registered, and update the connection string if only the newer name is available.

Match the application's architecture

  • For a 32-bit application, install the 32-bit ACE OLE DB provider.
  • For a 64-bit application, install the 64-bit provider.

Change the platform target in Visual Studio

  • Open the project's properties.
  • Go to the "Build" tab.
  • Set "Platform target" to x86 or x64 to match the Access Database Engine you installed.

Repair or reinstall

If the error persists, repair the Microsoft Access Database Engine from the Control Panel or reinstall the package.

Where the error shows up

A .NET application reading Excel

csharp
1public DataSet GetDataFromExcel(string filePath)
2{
3    string connString = $"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={filePath};Extended Properties=\"Excel 12.0 Xml;HDR=YES\";";
4    using (OleDbConnection conn = new OleDbConnection(connString))
5    {
6        OleDbDataAdapter cmd = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", conn);
7        DataSet ds = new DataSet();
8        cmd.Fill(ds);
9        return ds;
10    }
11}

Resolution: install the ACE provider that matches the app's architecture and redeploy.

SSIS packages

If an SSIS package fails with this error, make sure SQL Server Data Tools (SSDT) matches the ACE OLE DB provider version.

Causes and fixes at a glance

CauseSolution
Provider Not InstalledInstall Microsoft Access Database Engine
Architecture MismatchMatch application and provider architectures
Permission IssuesEnsure correct permissions to run the application
Corrupted InstallationReinstall or repair the ACE OLE DB provider

Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design