Click here to Skip to main content
15,896,269 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
connection string used in my program is---
Dim NewStr As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\" & myDB & ";Persist Security Info=True;Jet OLEDB:Database Password=" & myPwd


the program setup is working fine in the 32 bit os..
but not working in 64 bit os. it shows the error msg as- The Microsoft.jet.OLEDB.12.0 provider is not registered on the local machine.
it works only after installing the access database engine 64 bit.

is there any way to make a setup which work in both 32 bit as well as 64 bit os.
please help...
Posted

You need to configure your project to compile and specifically target 32 bit. Do this by going into your Project Properties, the Compile tab, and click the Advanced Compile Options button. In the Advanced Compiler Settings find the Target CPU and set it to x86.

Or if I'm misunderstanding your problem, you could try some of these[^] solutions.
 
Share this answer
 
v2
Comments
BBORA 26-Oct-13 12:17pm    
tried but problem not solved.
The problem is that you don't have a 64-bit ACE provider installed on the system. Apparently, the target system only has the 32-bit version installed, probably from a 32-bit installation of Office.

You can get the 64-bit version of ACE from here[^]. This will have to be installed on the system at the time you install your app on it.

You may as well pick up both the 32-bit and 64-bit ACE installers since your application may run into a system where Office isn't installed at all and will still need to install the correct ACE provider for your application, depending on the system architecture, either 32- or 64-bit.
 
Share this answer
 
Comments
BBORA 26-Oct-13 12:15pm    
yes. target machine only has 32 bit version. but problem is that i have to uninstall the 32 bit office before installing the 64 bit version. there is a option to install the 64 bit with the 32 bit by using the /passive command from the command prompt.
so is there any option by which i can install the 64 bit version along with my program installation.
Dave Kreskowiak 26-Oct-13 13:08pm    
True. You must uninstall the 32-bit ACE to install the 64-bit version. MS doesn't support a side-by-side installation.

If you're using Office dependencies (the ACE engine) in your application, you are limited to running your application in the architecture of Office, NOT of Windows.

So, uninstalling the 32-bit ACE will effectively break the 32-bit version of Office, specifically, Access and Excel.

For this situation, you'd be better off installing the 32-bit version of your application (compiled as x86, NOT AnyCPU).

If, on a 64-bit machine, either Office is not installed or 64-bit Office IS installed, you can install the 64-bit version of your application (compiled as 64-bit, NOT AnyCPU).
BBORA 30-Oct-13 9:24am    
what are the other options apart from the Office dependencies (the ACE engine).
so that the application become independent of Office architecture.
Dave Kreskowiak 30-Oct-13 10:54am    
SQL Server Express, LocalDb, MySQL, SQLite, MogoDb, and dozens of others, ...
hi
You can try this

Right click on your solution and click on properties

In configuration properties

Select Platform which you want to run your application
like x86 or any cpu.

And build your project.

try this

i hope it will help full for you.
 
Share this answer
 
To my best understanding of the question, try to create a connection string that points to the location of the database for 64bit systems
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900