locked
Data Access Application Block with Access 97 RRS feed

  • Question

  • User524050414 posted
    Hi there. I am working on a old system which uses Access 97 (I need to write a ASP.NET 2.0 front end for it). Does anyone know the correct connection string to go into my web.config file to get it to work with my DAAB?

    I have tried a few Access connection strings on the net but none seem to work. I keep getting

    "System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Configuration.ConfigurationErrorsException: The requested database mydbconnectionstring is not defined in configuration."


    I have 2 databases I need to connect to and I have tried using OLEDB and ODBC but nothing seems to work.

    Below is my Web.Config file if that helps (slightly edited).

    <configuration>
        <configSections>
            <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/>
        </configSections>
      <dataConfiguration defaultDatabase="Database1" />
      <appSettings/>
        <connectionStrings>
            <add name="Database1" connectionString="myConnectionString.mdb" providerName="System.Data.OleDb" />
            <add name="database2" connectionString="myConnectionString.mdb" providerName="System.Data.Odbc"/>
       
        </connectionStrings>

    ..........

     Anyone got any ideas?

     

    Saturday, March 10, 2007 1:39 PM

Answers

  • User-821857111 posted

    "myConnectionString.mdb" is not a connection string.  This is:

    "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=<full path to database>\mydbname.mdb". Try that first.  If it doesn't work, you will have to try the ODBC driver (and the very best of British to you).

    http://www.connectionstrings.com/?carrier=access 

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, March 10, 2007 3:15 PM

All replies

  • User-821857111 posted

    "myConnectionString.mdb" is not a connection string.  This is:

    "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=<full path to database>\mydbname.mdb". Try that first.  If it doesn't work, you will have to try the ODBC driver (and the very best of British to you).

    http://www.connectionstrings.com/?carrier=access 

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, March 10, 2007 3:15 PM
  • User524050414 posted
    Thanks bud, it worked a treat. All the connections strings I found with OleDb had a 12 in it and were different to that.
    Sunday, March 11, 2007 5:06 AM