Globala.asa not running

Results 1 to 3 of 3

Thread: Globala.asa not running

  1. #1
    Join Date
    Dec 1969

    Default Globala.asa not running

    I have the following text in my on session end. For some reason this never seems to fire. Any help would be appreciated.<BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR><BR>&#039You can add special event handlers in this file that will get run automatically when<BR>&#039special Active Server Pages events occur. To create these handlers, just create a<BR>&#039subroutine with a name from the list below that corresponds to the event you want to<BR>&#039use. For example, to create an event handler for Session_OnStart, you would put the<BR>&#039following code into this file (without the comments):<BR><BR>Sub Session_OnStart<BR>&#039**Put your code here **<BR>Timeout = 5<BR>End Sub<BR><BR>Sub Session_OnEnd &#039Runs when a user&#039s session times out or quits your application<BR> &#039close all connections<BR> <BR> set fso = server.CreateObject("scripting.FileSystemObject") <BR> FilePath = "E:InetpubwwwrootCardmaintTransMAX.txt"<BR> set fExport = fso.CreateTextFile(FilePath,true)<BR> fExport.writeline("WOW MAN")<BR> fExport.close<BR> <BR> dim strSQLPad &#039sql string for temp trans to be exported<BR> dim rsPad &#039rs of records to export<BR> dim strSQLCard &#039sql string for card file<BR> dim rsCard &#039rs for card file<BR> <BR> strSQLPad = "Select * from TRNFILE Where [TRNWEBTEMPTRANS] = &#039" & Session("Trans") &"&#039 And TRNWEBACCEPTED = -1"<BR> set rsPad = server.CreateObject("ADODB.Recordset")<BR> rsPad.Open strSQLPad,Conn,adOpenDynamic,adLockOptimistic<BR> <BR> if rsPad.BOF and rsPad.EOF then<BR> &#039Nothing for this transaction so ignor<BR> else <BR> &#039Delete records in the transaction file<BR> while not rsPad.EOF<BR> rsPad.Delete<BR> rsPad.movenext<BR> wend <BR> <BR> &#039Reset card file<BR> strSQLCard = "Select * from FMPCARDE Where [WEBUSER] = &#039" & Session("User") & "&#039"<BR> set rsCard = server.CreateObject("ADODB.Recordset")<BR> rsCard.Open strSQLCard,Conn,adOpenDynamic,adLockOptimistic<BR> <BR> while not rsCard.EOF<BR> rsCard("WEBSTATUS") = null<BR> rsCard("WEBTEMPTRANS") = null<BR> rsCard("WEBUSER") = null<BR> rsCard("WEBACCEPTED") = 0<BR> rsCard.Update<BR> rsCard.MoveNext<BR> wend <BR> <BR> rsCard.Close<BR> set rsCard = nothing <BR> end if <BR> <BR> rsPad.Close<BR> set rsPad = nothing<BR> PadString = true<BR> <BR> conn.close<BR> set conn = nothing<BR> set rs = nothing<BR><BR>end sub<BR>&#039Application_OnStart Runs once when the first page of your application is run for the first time by any user<BR>&#039Application_OnEnd Runs once when the web server shuts down<BR><BR>&#060;/SCRIPT&#062;

  2. #2
    Olivier Guest

    Default typo?

    it is global.asa and not globala.asa

  3. #3
    Join Date
    Dec 1969

    Default RE: typo?

    I had same problem but mine was typed right global.asa<BR>I just had to have it in a parent folder of my asp pages that called the session/app variables. Then they worked but before I had them in the same folder as the global.asa and they didn&#039t work. Doug

Posting Permissions

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