Multiple Database Connections

Results 1 to 2 of 2

Thread: Multiple Database Connections

  1. #1
    Join Date
    Dec 1969

    Default Multiple Database Connections

    hi,<BR>I have created an employee satisfaction survey for my company.I am using Access 2000 as the backend to store the survey.<BR> This survey will also be run for another branch of our company , but the survey should be seperate from the first one. i.e. <BR><BR>different database etc.<BR><BR>The IIS directory structure is as following:<BR><BR>Main-&#062; The home directory of the Website<BR>Ess1-&#062;(Virtual Directory) First Employee Satisfaction Survey <BR>Ess2-&#062;(Virtual Directory) Employee Satisfaction Survey for the Branch<BR><BR>The database is placed inn a folder "DB"<BR> under ESS1 and ESS2<BR><BR>I am using ADO to connect to the database using OLE. The connection string I use is <BR><BR>strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0; DATA SOURCE="<BR>strconn=strconn & server.mappath("ESS1DBSurveyData.mdb") & ";"<BR>strconn=strconn & "User ID=Admin;Password=ess2003;"<BR><BR><BR>This means that I have to change the connection string for ESS2(in every ASP file). How can I write a generic connection string that will connect to the Database under the "DB" folder which is in the respective Virtual Directories (i.e ESS1 and ESS2), so that I dont have to change the connection string for ESS2.<BR><BR>I tried using server.mappath("DBSurveyData.mdb") , but it looks for the database under MainDB and not under MainESS1DB.<BR><BR>Any ideas???<BR><BR>Thanks<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Multiple Database Connections

    Server.MapPath("DBSurveyData.mdb")<BR><BR>?<BR><BR >Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts