Solved

VB.NET problem connecting to Access Database OLEDB.4.0

Posted on 2014-12-16
2
502 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

740 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