Solved

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

Posted on 2014-01-28
6
9,589 Views
Last Modified: 2014-01-28
Hi Experts,

I have an aspx page that is creating a db connection using the following code:

dbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=C:/DB/MyDb.mdb")
        dbconn.Open()

When I access the page I get the following error:

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

How do I register the db connection?
0
Comment
Question by:DColin
  • 3
  • 3
6 Comments
 
LVL 33

Expert Comment

by:Big Monty
ID: 39815573
Are you running your application on x64 or x86 version of Windows?

If so, I would suggest changing the Platform Target build option for your application to target x86 rather than Any CPU. Currently it appears that you are loading some assemblies out of the x64 GAC which would indicate that you are running x64 windows and Microsoft.Jet.OLEDB.4.0 provider is not 64-bit compatible.

To resolve this issue open the project in Visual Studio then:

1. From the solution explorer right-click your project then click Properties
2. Click the Build tab
3. Change Platform target from: Any CPU to x86
4. Re-build your solution
0
 

Author Comment

by:DColin
ID: 39815684
Big Monty,

There is no solution to build. This is an aspx web page written as a text file with an aspx extension that is uploaded to my server. When the web page is accessed the server builds the code on the fly and executes it.
0
 
LVL 33

Expert Comment

by:Big Monty
ID: 39815792
are you running 64 bit windows?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:DColin
ID: 39815851
Windows Server 2008 R2 Standard 64 bit
0
 

Author Comment

by:DColin
ID: 39815853
I have written several Windows applications that are running without problems on this server and use the same connection string as the aspx page.
0
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 39815879
The Microsoft.Jet.OLEDB.4.0 driver is incompatible with 64 bit Windows, that is why you are getting the error. If you have other applications using that connection string, they are more than likely set up to run in Windows 32 bit mode.

MS has released a driver that'll run in both 32 and 64 bit modes, you can find it here:

http://www.microsoft.com/download/en/details.aspx?id=13255

You can also try enabling 32 bit within your IIS
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now