Solved

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

Posted on 2014-01-28
6
9,919 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 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