global.asa problem

Results 1 to 2 of 2

Thread: global.asa problem

  1. #1
    Join Date
    Dec 1969

    Default global.asa problem

    Hi all,<BR><BR>I have a problem with the Global.asa file. Any help/ideas is greatly appreciated. <BR><BR>The Session_onEnd function does not execute when the browser closes or a session timedout. However, if I put the same code into a different function as an include file, it runs fine. The function calls a store procedure and it updates the database which logs a user&#039;s timeout datetime.<BR>Below is the code for my session_onEnd subroutine.<BR><BR>Thanks in advance for all your help!<BR>========================================= ===================<BR><BR>&#060;SCRIPT LANGUAGE=vbscript RUNAT=Server&#062;<BR><BR>Sub Session_OnEnd<BR>On Error Resume Next<BR><BR>dim ocon <BR>set ocon=server.CreateObject("ADODB.Connection")<BR>oc on.ConnectionString="PROVIDER=MSDAORA.1;DATA SOURCE=test;USER ID=test;PASSWORD=test"<BR>ocon.Mode=adModeReadWrit e<BR>ocon.Open <BR><BR>Dim cm<BR>Set cm = Server.CreateObject("ADODB.Command")<BR>cm.Command Type = adCmdStoredProc<BR>cm.CommandText = "TestStoreProcedureName"<BR>cm.ActiveConnectio n = connectionstringname<BR><BR>&#039;&#039;&#039;&#03 9;INPUT PARAMETERS<BR>cm.Parameters.Append cm.CreateParameter("USER_ID", adInteger, adParamInput, 50, session.Value("user_id"))<BR>cm.Parameters.Append cm.CreateParameter("SESSION_ID", adInteger, adParamInput, 50, session.SessionID)<BR><BR>cm.Execute <BR>set cm=nothing<BR><BR>call ocon.close<BR>set ocon = nothing<BR>End Sub<BR>&#060;/SCRIPT&#062;

  2. #2
    Join Date
    Dec 1969

    Default Session_onEnd is notorious...

    ...for being unreliable.<BR><BR>You really can not depend on it, for anything.<BR><BR>

Posting Permissions

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