Using more than one Access database

Discussion in 'ASP.NET / ASP.NET Core' started by Bruce, Mar 4, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce

    Bruce DiscountASP.NET Staff

    You don't have to put the connection string in the web.config file.

    You can put it in any aspx page. If you want to make the connection string available to the whole application, you can set it as application variable in the application start sub in the global.asa file.

    You cannot have more than 1 web.config in a single application.

    Hope this helps.

    quote:Originally posted by Malin

    Hi

    Now I use just one Access database in my folder on the server. My problem is that I want to use more than one database but don´t know how to tell the sql connection string in the web.config file that the search path to the database now could be two different paths.

    Now it looks like this:

    sqlConnectionString="data source=e:\web\fagelfenix1\htdocs\database\XXXXX.mdb;user id=sa;password=XXXX"

    I have tried to upload a diffrent folder with aspx-files, database and another web.config but this seems to be wrong. I understand that it is only allowed to use ONE web.config in my whole folder (my whole area at discountAsp.net)? Is this right? How can I write in web.config to be able to use more than one database? Or can I use more than one web.config if those are placed in diffrent folders (I must have done something very wrong when I tried this if this should be possible)?

    Is there a solution for this "beginners-problem"? [:p]

    Malin
    </blockquote id="quote"></font id="quote">
     
  2. Hi

    Now I use just one Access database in my folder on the server. My problem is that I want to use more than one database but don´t know how to tell the sql connection string in the web.config file that the search path to the database now could be two different paths.

    Now it looks like this:

    sqlConnectionString="data source=e:\web\fagelfenix1\htdocs\database\XXXXX.mdb;user id=sa;password=XXXX"

    I have tried to upload a diffrent folder with aspx-files, database and another web.config but this seems to be wrong. I understand that it is only allowed to use ONE web.config in my whole folder (my whole area at discountAsp.net)? Is this right? How can I write in web.config to be able to use more than one database? Or can I use more than one web.config if those are placed in diffrent folders (I must have done something very wrong when I tried this if this should be possible)?

    Is there a solution for this "beginners-problem"? [:p]

    Malin
     
  3. Thanks Bruce

    It works perfectly now!

    [8D]

    // Malin
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page