Access 2007 Connection

Posted on 2011-04-19
Last Modified: 2013-11-28
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?

Question by:Buck_Beasom
    LVL 22

    Expert Comment

    by:Nico Bontenbal
    If you use 64 bits windows your solution might be this:
    LVL 16

    Expert Comment

    by:Imran Javed Zia
    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

    Author Comment

    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?

    LVL 16

    Expert Comment

    by:Imran Javed Zia
    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

    Author Comment

    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

    LVL 16

    Accepted Solution

    if you have added config file in setup project? by the way it is generally named as YourProjectName.exe.config in deployment

    Author Comment

    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.


    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Access, OLEDB and connection string 11 27
    Running Sum Help 31 24
    Excel To Access Database Transfer 14 25
    DataGridView 2 16
    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — 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…
    Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    746 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

    17 Experts available now in Live!

    Get 1:1 Help Now