Solved

VB.NET problem connecting to Access Database OLEDB.4.0

Posted on 2014-12-16
2
478 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
2 Comments
 
LVL 69

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now