Click here to Skip to main content
11,928,786 members (48,071 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB VB.NET
Good day, hope all is well?

I designed a program with VB.NET 2010 and MS Access 2007. The program executed well on the computer I used to design it which is a 32bit computer. When i deploy the same program on a 64bit computer, it will execute but when I am connecting to the database, an error will be encountered.

I set the target of the program to all CPU, I have also installed 32 bit and 64 bit Access Database engine on the 64bit computer, but am still getting the same error.

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

Please, help needed.
Posted 28-Mar-13 6:27am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can't.

There is no 64 bit compatible version of the Jet database engine, only a 32 bit version, and there is very unlikely ever to be one.

Either build your app for 32 bit targets, or use the ACE engine instead.
Jonathan [Darka] 28-Mar-13 11:42am
Agree with OriginalGriff, no chance ever of a 64-bit version of JET, either go 32-bit or find another technology to use.
tarhex 28-Mar-13 11:49am
Ok, what do you suggest I do because there is a possibility that the program might be deployed in a 64 bit computer.
OriginalGriff 28-Mar-13 11:52am
You have three choices:
1) Compile your app for 32 bit only, rather than the default "Any CPU"
2) Switch to the ACE database engine, which has 32 and 64 bit versions
3) Switch to a different database system altogether - perhaps SQL server?
Jonathan [Darka] 28-Mar-13 11:51am
You can still run 32-bit apps on a 64-bit computer, just compile it as a 32-bit app and it should work fine, what you want to avoid is compiling it as a 64-bit app
tarhex 28-Mar-13 12:13pm
If I compile for 32 bit only, will the error be avoided?

Can I use the ACE database engine with my current database (MS Access 2007)?

Is the ACE not a kind of a connection string?
OriginalGriff 28-Mar-13 12:23pm

Yes, 32 bit compile will avoid the error.
Yes and No: The ACE database engine *is* Access - but a more modern version than the Jet Engine (which was around from the 1990's!) and is available in 32 and 64 bit versions. It's not just a connection string, any more than my email address is me - it's the code which accesses the database file for you, and you contact it via the connection string in the same way you would contact me via my email address. You will probably have to install the engine on all the relevant PC's.
Maciej Los 28-Mar-13 12:37pm
tarhex 28-Mar-13 12:50pm
I think those files I downloaded are the ACE database engine files. But if compiling in 32 bit without installing any additional file will solve the problem, I will stick with that. Thanks, Big Bro.
OriginalGriff 28-Mar-13 13:06pm
You're welcome!
tarhex 28-Mar-13 13:33pm
I have a question, how do I compile for 32 bit.
OriginalGriff 28-Mar-13 15:07pm
In the solution pane, double click "Properties" under your project.
This will open the Project Properties as a page.
Select the "Build" tab on the left hand side, and look for "Platform target".
Use the drop down to change "Any CPU" to "x86"
Close the properties window and rebuild your project.
sariqkhan 29-Mar-13 1:07am
OG sir can you please help me here if you can
tarhex 28-Mar-13 15:18pm
ok, thanks
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

OriginalGriff's answer is very good and i would suggest you to read this additional information:[^].

How to create connection string[^]?
tarhex 28-Mar-13 12:58pm
@Maciej Los those are the files i downloaded and here is my connection string

Dim cnxn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Application.StartupPath & "\data\dbase.accd" + " ;Jet OLEDB:Database Password=mend;")

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web03 | 2.8.151126.1 | Last Updated 28 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100