global.asa question

Results 1 to 2 of 2

Thread: global.asa question

  1. #1
    Artemis Guest

    Default global.asa question

    I am using my PWS to give access to a database. My problem is that I would like to give access to another database, so I modified my global.asa file. Mind you, we are talking Access 2000. My default page comes up okay, but when it goes into my search.asp page, I get an error message:<BR>Error Type:<BR>Microsoft JET Database Engine (0x80040E37)<BR>The Microsoft Jet database engine cannot find the input table or query &#039;tblCFS&#039;. Make sure it exists and that its name is spelled correctly.<BR>/cfssearch.asp, line 50<BR><BR><BR>As soon as I comment out the second line of my second database, it works fine (for my first database query via the intranet).<BR><BR>Can anyone suggest anything?<BR><BR>My global.asa code is:<BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR> Sub Session_OnStart<BR> Session("RMS_ConnectionString") = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:documents and settingssanchezMy DocumentsRMSCAD
    mscad.mdb"<BR> Session("RMS_ConnectionString") = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:Documents and SettingssanchezMy DocumentsHRemployee database1.mdb"<BR> Session("RMS_ConnectionTimeout") = 15<BR> Session("RMS_CommandTimeout") = 30<BR> Session("RMS_UserName") = "Admin"<BR> Session("RMS_Password") = ""<BR> End Sub<BR> <BR>&#060;/SCRIPT&#062;<BR><BR>Thank you!<BR>

  2. #2
    Join Date
    Dec 1969

    Default Because I think...

    ...the value of second Session("RMS_ConnectionString") is over writing the first value, so there is no session of connection string for the first database when you use both the statements. Now as u said, if u remove the second connection string, it works, its because then the session value is intact for the first connection, I am sure if in ur asp page u query second database and still dont comment out the first connection string in the global file, then also it will work because anyway the first value has been overwritten by second session value and that is the one that is making the connection to the second database.<BR><BR>change the name of the connection for the second database and access it with that name in ur asp where u need to query the second database.

Posting Permissions

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