Posted on 2004-04-30
I am trying to update a database when a user exists my application. Problem is, sometimes users will not log out, they will leave the site, and the session will expire (after 20 minutes).
Now my question is, when the session_OnEnd is run, meaning a session is expired after timeout, or session.abandon, will the session_OnEnd know what session is ending?
Meaning could I do the following.
StrSQL=" UPDATE alerts SET ShowAlert = '0' WHERE ShowAlert = '1' and ownerid ="'& Session("StrOwner")&"' "
So the session that is about to be ended, can I pass the session StrOwner and update the database before the session has ended?
I know this isnt how you would call the SQL script, and that alot of information is missing to do this correctly, I am leaving this information out to try to give you a clear and general idea of what I am trying to do.
Thanks to everyone.