Solved

VB.NET problem connecting to Access Database OLEDB.4.0

Posted on 2014-12-16
2
505 Views
Last Modified: 2014-12-17
I am using VB.NET 2013 and an Access database (myDatabase.MDB) . My program runs fine in Debug mode but when I tried to run in Release mode I get the following error:
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

I am running this as an x86 application on Windows 7, 64-bit OS.  The connection string is as follows:

constr = "Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database L" & _
                        "ocking Mode=1;Jet OLEDB:Database Password=;Data Source=" & DatabaseName & ";Password=;Jet OLEDB:Engine Type=5;Jet" & _
                        " OLEDB:Global Bulk Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:S" & _
                        "ystem database=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Share Deny None;Je" & _
                        "t OLEDB:New Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:" & _
                        "Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=Fals" & _
                        "e;User ID=Admin;Jet OLEDB:Encrypt Database=False"

Where DatabaseName  =  myDatabase.MDB

After some research it appears that there is some compatibility issue with OLEDB4.0 and  a 64-bit OS but I cannot seem to find an answer that seems to address the problem.
The MS Office is Version 2013

Can anyone help solve this problem?

Thanks,
Charlie
0
Comment
Question by:charlieb01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 40503955
are both debug and release targeting x86 platform? Currently, your Release mode is surely set to Any Cpu. Change it to x86.
0
 

Author Closing Comment

by:charlieb01
ID: 40504958
Eric,
You're the man!  I found all kinds of stuff on the net telling me I had to download stuff and that just didn't make sense.
This is why I belong to E-E!

Thanks again,
Charlie
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

705 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