|
 |
asp_web_howto thread: Ending Session
Message #1 by "Simon Garstin" <sales@o...> on Wed, 26 Sep 2001 09:50:57 +0100
|
|
Hi,
how can the subroutine Session_OnEnd in global.asa be used to, say clean up
some records in a database ?
In other words is it possible to run a script on Session_OnEnd or can you
only assign/de-assign values to variables ?
thanks
Simon Garstin
Message #2 by irfan.syed@g... on Wed, 26 Sep 2001 18:09:52 +0800
|
|
You can call virtually any method or object on Session_OnEnd. That
means you can also delete records from database and so on.
IS_
"Simon Garstin" <sales@o...> on 09/26/2001 04:50:57 PM
Please respond to "ASP Web HowTo" <asp_web_howto@p...>
To: "ASP Web HowTo" <asp_web_howto@p...>
cc: (bcc: Irfan H Syed/DHS/DHBG)
Subject: [asp_web_howto] Ending Session
Hi,
how can the subroutine Session_OnEnd in global.asa be used to, say
clean up some records in a database ?
In other words is it possible to run a script on Session_OnEnd or can
you only assign/de-assign values to variables ?
thanks
Simon Garstin
Message #3 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 26 Sep 2001 11:29:15 +0100
|
|
the only thing you can't do in global.asa is use response and request. You
can certainly do database work.
-----Original Message-----
From: Simon Garstin [mailto:sales@o...]
Sent: 26 September 2001 09:51
To: ASP Web HowTo
Subject: [asp_web_howto] Ending Session
Hi,
how can the subroutine Session_OnEnd in global.asa be used to, say clean up
some records in a database ?
In other words is it possible to run a script on Session_OnEnd or can you
only assign/de-assign values to variables ?
thanks
Simon Garstin
Message #4 by "Simon Garstin" <sales@o...> on Wed, 26 Sep 2001 13:18:37 +0100
|
|
Just to clarify.
Suppose I want to call this function from session on-end:
function do_something() {
dim x,y
x=1
y=x+1
}
is it called like this?:
sub Session_OnEnd
do_something()
end sub
finally, where and how should the function code be stored ? In global.asa ?
cheers
Simon Garstin
----- Original Message -----
From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>
To: ASP Web HowTo <asp_web_howto@p...>
Sent: Wednesday, September 26, 2001 11:29 AM
Subject: [asp_web_howto] RE: Ending Session
> the only thing you can't do in global.asa is use response and request.
You
> can certainly do database work.
>
> -----Original Message-----
> From: Simon Garstin [mailto:sales@o...]
> Sent: 26 September 2001 09:51
> To: ASP Web HowTo
> Subject: [asp_web_howto] Ending Session
>
>
> Hi,
>
> how can the subroutine Session_OnEnd in global.asa be used to, say clean
up
> some records in a database ?
> In other words is it possible to run a script on Session_OnEnd or can you
> only assign/de-assign values to variables ?
>
> thanks
>
>
> Simon Garstin
$subst('Email.Unsub')
>
>
>
Message #5 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 26 Sep 2001 13:28:34 +0100
|
|
yes, or you can just put the code directly into Session_OnEnd.
You can put your other functions into global.asa, or if they're shared with
other ASPs you can use an include file.
-----Original Message-----
From: Simon Garstin [mailto:sales@o...]
Sent: 26 September 2001 13:19
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Ending Session
Just to clarify.
Suppose I want to call this function from session on-end:
function do_something() {
dim x,y
x=1
y=x+1
}
is it called like this?:
sub Session_OnEnd
do_something()
end sub
finally, where and how should the function code be stored ? In global.asa ?
cheers
Simon Garstin
----- Original Message -----
From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>
To: ASP Web HowTo <asp_web_howto@p...>
Sent: Wednesday, September 26, 2001 11:29 AM
Subject: [asp_web_howto] RE: Ending Session
> the only thing you can't do in global.asa is use response and request.
You
> can certainly do database work.
>
> -----Original Message-----
> From: Simon Garstin [mailto:sales@o...]
> Sent: 26 September 2001 09:51
> To: ASP Web HowTo
> Subject: [asp_web_howto] Ending Session
>
>
> Hi,
>
> how can the subroutine Session_OnEnd in global.asa be used to, say clean
up
> some records in a database ?
> In other words is it possible to run a script on Session_OnEnd or can you
> only assign/de-assign values to variables ?
>
> thanks
>
>
> Simon Garstin
>
Message #6 by Kyle Burns <kburns@c...> on Wed, 26 Sep 2001 08:09:28 -0500
|
|
IIRC, Include files do not work with Global.asa. I'm basing this statement
on what I know to be fact in earlier versions of ASP, but I don't know if
this has changed.
=================================
Kyle M. Burns, MCSD
ECommerce Technology Manager
Centra Credit Union
kburns@c...
-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]
Sent: Wednesday, September 26, 2001 7:29 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Ending Session
yes, or you can just put the code directly into Session_OnEnd.
You can put your other functions into global.asa, or if they're shared with
other ASPs you can use an include file.
-----Original Message-----
From: Simon Garstin [mailto:sales@o...]
Sent: 26 September 2001 13:19
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Ending Session
Just to clarify.
Suppose I want to call this function from session on-end:
function do_something() {
dim x,y
x=1
y=x+1
}
is it called like this?:
sub Session_OnEnd
do_something()
end sub
finally, where and how should the function code be stored ? In global.asa ?
cheers
Simon Garstin
----- Original Message -----
From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>
To: ASP Web HowTo <asp_web_howto@p...>
Sent: Wednesday, September 26, 2001 11:29 AM
Subject: [asp_web_howto] RE: Ending Session
> the only thing you can't do in global.asa is use response and request.
You
> can certainly do database work.
>
> -----Original Message-----
> From: Simon Garstin [mailto:sales@o...]
> Sent: 26 September 2001 09:51
> To: ASP Web HowTo
> Subject: [asp_web_howto] Ending Session
>
>
> Hi,
>
> how can the subroutine Session_OnEnd in global.asa be used to, say clean
up
> some records in a database ?
> In other words is it possible to run a script on Session_OnEnd or can you
> only assign/de-assign values to variables ?
>
> thanks
>
>
> Simon Garstin
>
$subst('Email.Unsub')
Message #7 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 26 Sep 2001 14:39:54 +0100
|
|
They do work! (I'm using IIS4 on NT4)
-----Original Message-----
From: Kyle Burns [mailto:kburns@c...]
Sent: 26 September 2001 14:09
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Ending Session
IIRC, Include files do not work with Global.asa. I'm basing this statement
on what I know to be fact in earlier versions of ASP, but I don't know if
this has changed.
=================================
Kyle M. Burns, MCSD
ECommerce Technology Manager
Centra Credit Union
kburns@c...
-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]
Sent: Wednesday, September 26, 2001 7:29 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Ending Session
yes, or you can just put the code directly into Session_OnEnd.
You can put your other functions into global.asa, or if they're shared with
other ASPs you can use an include file.
-----Original Message-----
From: Simon Garstin [mailto:sales@o...]
Sent: 26 September 2001 13:19
To: ASP Web HowTo
Subject: [asp_web_howto] RE: Ending Session
Just to clarify.
Suppose I want to call this function from session on-end:
function do_something() {
dim x,y
x=1
y=x+1
}
is it called like this?:
sub Session_OnEnd
do_something()
end sub
finally, where and how should the function code be stored ? In global.asa ?
cheers
Simon Garstin
----- Original Message -----
From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>
To: ASP Web HowTo <asp_web_howto@p...>
Sent: Wednesday, September 26, 2001 11:29 AM
Subject: [asp_web_howto] RE: Ending Session
> the only thing you can't do in global.asa is use response and request.
You
> can certainly do database work.
>
> -----Original Message-----
> From: Simon Garstin [mailto:sales@o...]
> Sent: 26 September 2001 09:51
> To: ASP Web HowTo
> Subject: [asp_web_howto] Ending Session
>
>
> Hi,
>
> how can the subroutine Session_OnEnd in global.asa be used to, say clean
up
> some records in a database ?
> In other words is it possible to run a script on Session_OnEnd or can you
> only assign/de-assign values to variables ?
>
> thanks
>
>
> Simon Garstin
>
Message #8 by "Ken Schaefer" <ken@a...> on Thu, 27 Sep 2001 15:05:07 +1000
|
|
Interestingly, I saw this point debated on another list.
Include files do work, but your code needs to be in <script runat="server">
tags, not <% %> tags.
However, I'm not sure of the IIS version this pertains to.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Kyle Burns" <kburns@c...>
Subject: [asp_web_howto] RE: Ending Session
: IIRC, Include files do not work with Global.asa. I'm basing
: this statement on what I know to be fact in earlier versions of ASP,
: but I don't know if this has changed.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
 |