Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: 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
tarhex407
Rate this: bad
good
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.
  Permalink  
Comments
Jonathan [Darka] at 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 at 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 at 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] at 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 at 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 at 28-Mar-13 12:23pm
   
Yes.
Yes.
No.
 
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 at 28-Mar-13 12:37pm
   
+5!
tarhex at 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 at 28-Mar-13 13:06pm
   
You're welcome!
tarhex at 28-Mar-13 13:33pm
   
I have a question, how do I compile for 32 bit.
OriginalGriff at 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 at 29-Mar-13 1:07am
   
OG sir can you please help me here if you can
http://www.codeproject.com/Questions/569299/loadingplusmoreplusthanplusoneplusreportsplusinplu
tarhex at 28-Mar-13 15:18pm
   
ok, thanks
Rate this: bad
good
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: http://social.msdn.microsoft.com/Forums/en-US/vstsdb/thread/1d5c04c7-157f-4955-a14b-41d912d50a64/[^].
 
How to create connection string[^]?
  Permalink  
Comments
tarhex at 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
0 Kornfeld Eliyahu Peter 169
1 Zoltán Zörgő 139
2 George Jonsson 135
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 28 Mar 2013
Copyright © CodeProject, 1999-2014
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