This topic is locked

global.asa

5/8/2010 12:53:48 PM
ASPRunnerPro General questions
F
funklet author

Hi,
I have manually put a sub in global.asa which inserts a record into a table when the session ends or the user logs out:

Sub Session_OnEnd

strConnection = "someconnectioninfo"

set conn = Server.CreateObject("ADODB.Connection")

conn.ConnectionString = strConnection

conn.open

set comm = Server.CreateObject("ADODB.command")

comm.CommandText = "Insert into etc. etc."

comm.ActiveConnection = conn

comm.Execute

conn.close

set conn = nothing

set comm = nothing

End Sub


This code works absolutely fine.
The issue is that unless I am missing something there is no way of inserting this code into the ASPRunner program and every time I build the project I have to put the code back in or copy the old file back onto the newly generated file.
Is there something I have missed or is this a feature request...
Kind regards

A
ann 5/13/2010

Hi,
You should make these changes you want to be saved in ASPRunner6.2/source directory. All documents in your /project folder will be renewed after you build the project.

Sergey Kornilov admin 5/13/2010

Personally I won't recommend to rely on global.asa file.
You can have better luck using AfterAppInit event in ASPRunnerPro.