Solved

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

Posted on 2014-01-28
6
10,419 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

751 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