Regd. the error message that I get....

Results 1 to 2 of 2

Thread: Regd. the error message that I get....

  1. #1
    Krishna Guest

    Default Regd. the error message that I get....

    Hai,<BR>I have a small ASP application. My Web admin told me not to use the DSN to connect to the database and that I have to include some code into the global.asa file inorder to conect to the access database. The code that I included was <BR>....<BR>Sub Application_OnStart<BR> Appplication("MDB_ConnectionString")="Provider=Mic rosoft.Jet.OLEDB.4.0;Server.MapPath("fpdb/K12.mdb")&";"<BR> Application("MDB_ConnectionTimeout") = 15<BR> Application("MDB_CommandTimeout") = 30<BR> Application("MDB_CursorLocation") = 3<BR> Application("MDB_RuntimeUserName") = ""<BR> Application("MDB_RuntimePassword") = "" <BR>End Sub<BR>Sub Session_OnStart<BR> Session("MDB_ConnectionString") = Application("MDB_ConnectionString") <BR> Session("MDB_ConnectionTimeout") = Application("MDB_ConnectionTimeout") <BR> Session("MDB_CommandTimeout") = Application("MDB_CommandTimeout") <BR> Session("MDB_CursorLocation") = Application("MDB_CursorLocation") <BR> Session("MDB_RuntimeUserName") = Application("MDB_RuntimeUserName") <BR> Session("MDB_RuntimePassword") = Application("MDB_RuntimePassword") <BR><BR>End Sub<BR>....<BR>and in the asp file the code that I had included was <BR>.....<BR>set conn=server.createobject("adodb.connection")<BR>co nn.Mode = adModeReadWrite<BR>conn.Open Session("MDB_ConnectionString"), Session("MDB_RuntimeUserName"), Session("MDB_RuntimePassword")<BR>DBused = "Access"<BR>..<BR>But when I access the asp file I get an error message saying that " An error occurred on the server when processing the URL. Please contact the web author or system administrator" <BR>Can anyone shed some light on it.<BR>Thanks,<BR>Krishna

  2. #2
    Join Date
    Dec 1969

    Default RE: Regd. the error message that I get....

    why are you puting application vars into session vars? how pointless is that???? very, very pointless, that&#039;s how much.<BR><BR>just use the application vars. you&#039;re creating needless overhead here.<BR><BR>the probable reason is that both onstart events are fired AT THE SAME TIME, so Session_onstart can&#039;t use the App vars yet. I can&#039;t be bothered thinking about it much further, because you shouldn&#039;t be doing it that way anyhow.<BR><BR>j

Posting Permissions

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