Solved

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

Posted on 2014-01-28
6
9,089 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 32

Expert Comment

by:Big Monty
Comment Utility
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
Comment Utility
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 32

Expert Comment

by:Big Monty
Comment Utility
are you running 64 bit windows?
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:DColin
Comment Utility
Windows Server 2008 R2 Standard 64 bit
0
 

Author Comment

by:DColin
Comment Utility
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 32

Accepted Solution

by:
Big Monty earned 500 total points
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

771 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

9 Experts available now in Live!

Get 1:1 Help Now