There are times when the coexistence of x64 and x86 code on the same machine can cause all sorts of seemingly strange issues.
Recently I was getting the following error:
The “Microsoft.Jet.OLEDB.4.0” provider is not registed on the local machine.
I think the error is generally due to either of two things:
- you don’t have Office 2007 / 2010 Jet driver installed on your Windows;
- or you are running a x86 application in a default x86 enviroment.
The first issue is easy to solve, just download the Access 2010 Database Engine from Microsoft (works with Access 2007 databases as well).
For the second one, the fix is also easy enough:
1. For .Net Desktop Application
Open your solution using visual studio, find Project Property – Build – Platform Target : Change it from “Any CPU” to “x86″.
2. For ASP.NET Application
Navigate to IIS Manager, the look under your machine name > Application Tool, under where you can call the DefaultAppPool’s advanced settings to change “Enable 32-Bits Application” to True.
If you are running a Windows 7 / 2008 x64 operation system and met with the same problem, you can find helpful solutions on the post:
CLICK HERE to view the Simplified Chinese version of this post.