Solved

VB.NET problem connecting to Access Database OLEDB.4.0

Posted on 2014-12-16
2
476 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
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…

771 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

10 Experts available now in Live!

Get 1:1 Help Now