This article gives an explanation about how to resolve error The 'Microsoft.ACE.OLEDB.12.0' Provider Is Not Registered On The Local Machine or The 'Microsoft.Jet.oledb.4.0' Provider is not registered on the local machine.
 |
The 'Microsoft.ACE.OLEDB.12.0' Provider Is Not Registered On The Local Machine |
Generally, this type of error comes while you working with Microsoft Access database connectivity with ADO.NET or when you work with Desktop applications which read from and write to various files formats including Excel, CSV, Access, Text files etc at that time you may have received following errors.
- The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
- The 'Microsoft.Jet.oledb.4.0' provider is not registered on the local machine
This is a very typical issue when you run your projects that are written in Visual Basic and Visual C# in Visual Studio version 2010, 2012, 2015,......,2019 and etc and It may be solved typically when you modify the AnyCPU to x86 rather than AnyCPU as I show in the screen.
Here I will show you how you can resolve these types of errors in easy steps and gives you the list of solutions to fix/resolve these types of errors. You Just try the subsequent solutions as I show you in this article and one by one until you fix the issue.
Solution 1: Change Target CPU from "Any CPU" to x86.
If you go with this solution then you should change Target CPU from "Any CPU" to x86 for your application and for that you can follow some steps as I shown below.
Step 1: Open your project in visual studio and press mouse right click on your project name from solution explorer.
Step 2: Now, click on the property.
Step 3: You can see the following window on your screen, and now click on "Build" from left penal and change platform target from AnyCPU to x86.
Step 4: Save all the created settings and for that, you can press Ctrl +S and rebuild your project and run the project.
If you go with this solution then you should Download 2007 office System Driver / Access Database Engine and install in your system.
If you go with this solution then you need to download the Microsoft Access Database Engine 2010 Redistributable and install in your system.
NOTE: If you transferring data Excel workbook into SQL Server or from SQL Server to Excel workbook either using SQL Server Import and Export Wizard or using C# or VB.net then you should go with Solution 3 that might resolve your error.
Summary
This article explains how to fix error The 'Microsoft.ACE.OLEDB.12.0' Provider Is Not Registered On The Local Machine and The 'Microsoft.Jet.oledb.4.0' provider is not registered on the local machine with very easy solutions.