Click here to Skip to main content
15,886,199 members
Articles / Web Development / ASP.NET
Tip/Trick

OLEDB Provider is Not Registered on the Local Machine

Rate me:
Please Sign up or sign in to vote.
4.62/5 (27 votes)
8 Jul 2012CPOL 522.4K   4   24
Solution for Exception: The 'Microsoft.ACE.OLEDB.12.0' 'Microsoft.Jet.oledb.4.0' provider is not registered on the local machine.

Introduction

While working with Microsoft Access Database connectivity with ADO.NET, you might have received this error:

  • 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.

Background

I got this error when I was connecting ADO.NET with Access 2010 database from Visual Studio 2010 C#.

Problem

Image 1

Solution

You need to change the Solution Platform from "Any CPU" to "x86". The steps are given below:

  1. Right click on the Solution File in Solution Explorer:

    Image 2

  2. Click on the Configuration Manager.
  3. Click on the Active Platform Drop down, if x86 is already there then select that, else click on New.

    Image 3

  4. Select x86 from the new platform dropdown:

    Image 4

  5. Compile and run your application.

If you are still facing the issue, then try installing Office System Driver.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
India India
Technical Manager/ Software Architect | CodeProject MVP | Visual Studio Marketplace Contributor | Author | Geek | Netizen | Husband | ChessPlayer

Most of my articles are listed on top 5 of the respective 'Best articles of the month' and some of my articles are published on ASP.NET WebSite's Article of the Day section.

Check my contributions in Visual Studio Marketplace and Code Project

Technical Blog: https://shemeerns.wordpress.com/
Facebook: http://facebook.com/shemeernsblog
Twitter : http://twitter.com/shemeerns
Google+ : http://google.com/+Shemeernsblog

Comments and Discussions

 
QuestionThank you but not working on VS2015 Update 3, winform application, x64 System. Pin
Clivic TR6-Jan-17 2:17
Clivic TR6-Jan-17 2:17 
QuestionWhy do we need to change platform to * 86? will my software work on every CPU? Pin
tommmmmy3-Apr-15 8:21
tommmmmy3-Apr-15 8:21 
GeneralRe: Why do we need to change platform to * 86? will my software work on every CPU? Pin
PIEBALDconsult3-Apr-15 8:40
mvePIEBALDconsult3-Apr-15 8:40 
Answeralternate solution Pin
skannan7418-Mar-15 0:50
skannan7418-Mar-15 0:50 
GeneralRe: alternate solution Pin
Clivic TR6-Jan-17 2:14
Clivic TR6-Jan-17 2:14 
AnswerIn my case I can't switch my application from 64-bit to 32-bit. i found my solution as described below. Pin
rahul-techie12-Feb-15 22:21
rahul-techie12-Feb-15 22:21 
Hi,

I have similar issue when we are reading Excel file.

History of the problem:

We recently migrated our application from 32-bit to 64-bit because of the memory requirement. For that we migrated our windows 7 from 32-bit to 64-bit. But still we installed 32-bit office on our machines.

because, of this we had this issue while importing Excel data into application.

Solution,

I downloaded 64-bit version of the http://www.microsoft.com/en-us/download/details.aspx?id=13255 and installed with argument as,

AccessDatabaseEngine_x64.exe /passive

Without any code change my issue get resolved.

Note:

On 64-bit OS and 64-bit office, my functionality was working fine without this fix. This fix is only required while our application is 64-bit running on 64-bit OS which is having 32-bit office installed on it.
GeneralRe: In my case I can't switch my application from 64-bit to 32-bit. i found my solution as described below. Pin
blaknar25-Sep-18 21:34
blaknar25-Sep-18 21:34 
QuestionThanks. It worked for me :) Pin
Jerin Kurian3-Dec-14 18:01
Jerin Kurian3-Dec-14 18:01 
QuestionOLEDB Provider is Not Registered on the Local Machine Pin
ckarstedt7-Oct-14 12:44
ckarstedt7-Oct-14 12:44 
QuestionGreat Work Pin
ImranSyed30-Sep-14 18:18
ImranSyed30-Sep-14 18:18 
GeneralMy vote of 5 Pin
Avelino Ferreira28-Jul-14 9:23
professionalAvelino Ferreira28-Jul-14 9:23 
GeneralRe: My vote of 5 Pin
AIturralde9-Sep-14 9:29
AIturralde9-Sep-14 9:29 
Answersolution Pin
info.mohamed27-Apr-14 1:03
info.mohamed27-Apr-14 1:03 
QuestionThanks you, it work for me ! Pin
thichngaodu28-Jan-13 0:32
thichngaodu28-Jan-13 0:32 
AnswerRe: Thanks you, it work for me ! Pin
Joezer BH15-Aug-13 1:42
professionalJoezer BH15-Aug-13 1:42 
Answermicrosoft.ace.oledb.12.0 provider is not registered on the local machine. Pin
Joannou H. Fegarido8-Oct-12 18:21
Joannou H. Fegarido8-Oct-12 18:21 
GeneralRe: microsoft.ace.oledb.12.0 provider is not registered on the local machine. Pin
Shemeer NS8-Oct-12 20:45
professionalShemeer NS8-Oct-12 20:45 
QuestionThe 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine Pin
Giri Dasari28-Sep-12 1:07
Giri Dasari28-Sep-12 1:07 
AnswerRe: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine Pin
Shemeer NS28-Sep-12 1:31
professionalShemeer NS28-Sep-12 1:31 
GeneralRe: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine Pin
brother.gabriel10-Jan-14 11:04
brother.gabriel10-Jan-14 11:04 
GeneralThoughts Pin
PIEBALDconsult9-Jul-12 3:57
mvePIEBALDconsult9-Jul-12 3:57 
GeneralRe: Thoughts Pin
Shemeer NS9-Jul-12 4:01
professionalShemeer NS9-Jul-12 4:01 
GeneralMy vote of 3 Pin
Guillaume Leparmentier8-Jul-12 8:01
Guillaume Leparmentier8-Jul-12 8:01 
GeneralRe: My vote of 3 Pin
Shemeer NS8-Jul-12 10:15
professionalShemeer NS8-Jul-12 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.