Access 2007 Connection

I have a VB2010 application that is connecting to a Microsoft Jet SQL back end that is installed on PCs with Access 2003 loaded. Presumably the installation of Access 2003 also registers the machine with Microsoft.Jet.OLEDB.4.0.

We are starting to transition users over to Office 2007 (even though virtually none of them actually use Access.) But apparently this transition has messed up the ability to access the old Access MDB, because when the first user tried to log into my app, they got a message:

The Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine.

Do I have to create a new application for the 2007 machines with a new connection string? Or is there something else that will allow machines with EITHER Access 2003 or Access 2007 to access the mdb on the server?

Buck_BeasomDatabase DesignerAsked:
Who is Participating?
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
if you have added config file in setup project? by the way it is generally named as YourProjectName.exe.config in deployment
Nico BontenbalCommented:
If you use 64 bits windows your solution might be this:
Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
there is no need to create different application,
just add connection string as following:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;Persist Security Info=

notice that there is change in provider
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Buck_BeasomDatabase DesignerAuthor Commented:
OK. But if I do that, and redeploy the application, will those folks who still only have Access 2003 on their computers also be able to access the data?

Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:
for such case you can use app.config to store connection string and just add related settings in app.config for 2003 and 2007 so your code will not need to be changed what you have to do is just change in config
Buck_BeasomDatabase DesignerAuthor Commented:
OK, but I need some help here. I find the app.config file in my application development environment and the code is attached. But when I went to one of the machines where the application is installed, I can't find an app.config file on that computer.

I'm pretty sure there is a way to get the application to look at some locally stored config file to get stuff like the connection string. (I did that in VB way back in the late 90s.) Then, as you indicate, I can have a customized config file for each user depending on which connection string they should use. But it does not appear that the app.config file is deploying with the application itself, and it is being constructed by VB 2010, not by me. So I really need to know 2 things:

1) What do I have to do inside the application to get it to look in a config file OUTSIDE the application for the Connection String data and

2) Where do I put that file (be it app.config, config.db or whatever) on the client so that the application will find it when it launches?


<?xml version="1.0" encoding="utf-8" ?>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="TBOPacing.Settings" type="System.Configuration.ClientSettingsSection, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
            <!-- This section defines the logging configuration for My.Application.Log -->
            <source name="DefaultSource" switchName="DefaultSwitch">
                    <add name="FileLog"/>
                    <!-- Uncomment the below section to write to the Application Event Log -->
                    <!--<add name="EventLog"/>-->
            <add name="DefaultSwitch" value="Information" />
            <add name="FileLog"
                 type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
            <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to the Application Event Log -->
            <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
            <setting name="Provider" serializeAs="String">
            <setting name="DataSource" serializeAs="String">
            <setting name="InitialCatalog" serializeAs="String">
            <setting name="UserID" serializeAs="String">
            <setting name="Password" serializeAs="String">

Open in new window

Buck_BeasomDatabase DesignerAuthor Commented:
I'm still missing some core concepts here.

My settings are attached. If I understand you correctly, I need to add a setting to tell the application that there is a config file where it can get values. But because I am relatively new at this, I have been relying on the deployment tools to do most of the heavy lifting. The other strange thing is that I can't even find a .exe file on the client machine that matches my application name. So when I launch the "Setup.exe" that is provided by the deployment tool, I know it is going out and getting the app, but I don't know where it is putting it.

Sorry to be so dense about this.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.