Solved 2010 - backend database Access but later SQL

Posted on 2011-05-04
Last Modified: 2012-05-11

I am building an Excel 2007 Workbook application in Visual Studio 2010.
I am going to start with an Access backend and then at some later
point change this to SQL. Because of this I want to maintain flexibility on the
connection to the database, and not use strongly typed datasets yet. I recently had a we app where I used a connection string as follows. Is this the best sort of approach?
How would I go about this?

    <add name="WhatEverNameYouWant" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|PWeb.accdb;"  />
Question by:murbro
    LVL 18

    Accepted Solution

    The connection string would change for SQL, but, once changed, it should work well PROVIDED you use field types that work with both Access and SQL.
    2007 added attachment and RTF Memo fields for SharePoint functionality, but I don't think they have a matching SQL field.

    Author Comment

    Hi. Thanks
    Would you be  able to give me an example of code to create such a connection

    Author Closing Comment

    Thanks very much for the advice

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    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 …

    779 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

    15 Experts available now in Live!

    Get 1:1 Help Now