"OLEDB Provider is not registered on the local machine"-How to fix

...
When I run my program having Microsoft Access Database connectivity with ADO.NET I receives an error saying "‘Microsoft.ACE.OLEDB.12.0′ provider is not registered on the local machine". Later I found a perfect but simple solution for the problem. I was really irritated because I could only complete the software after connecting the database.Read this carefully this would really help you.

You also might have faced such a problem. Here are two errors reported.
  • 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 
  • etc ...
The first error was received when I connected and ran the program with Access 2007 database from Visual Studio 2008 C# (Windows Application Form).

The second was taken from the sources which I had searched for helps.



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
Errors getting while opening Access database from Visual Studio C#

Solution

You can solve this issue indifferent ways as it occurs for different reasons. 
The error might be due to the mismatch in the platforms of the driver and the program, or it may occur if the Office Driver is not installed. so you want to run your program in the same platform or to install the Driver. Read and do the below steps carefully.
  • Go to Solution Explorer and right click on the Solution file of your project as shown in below screenshot.
  • Then choose Configuration Manager
Selecting Configuring Manager

  • Now You will get the Manager opened, there will be a drop down box to choose Active Solution platform.
  • Click on it, If x86 is already there then select that, else Click on New

Configuration Manager - Changing running Platform


  • And Change Any CPU to x86
  • Click  OK

New Solution Platform


  • Compile and run your application....    Happy Programming..  Cheers !.

Still Facing the Problem?

Worry not - try installing Office System Driver

Hope I have answered your query.If you like this please like and follow us, or subscribe for the newsletter.

...

0 comments:

Post a Comment