Unlocking db objects in Session end

G

Guest

Dear Folks,
in my web page i am locking some table, in DB. and i take care to
unlock it when a log out button is clicked before the session is abandoned.
however
if the page user, closes the browser window instead of clicking hte log out
button it does not work. will the code work if put in session end. but it
seems that it does not work. please suggest me some other way to achieve the
same.
Thanx in advance.
regards,
 
G

Guest

Sundararajan,

It does work if you put the code in Session_End. However, if you do not
explicity set the Session.Timeout, the default is 20 minutes. So, your code
in the Session_End won't excute until there is 20 minutes of inactivity on
that session.

HTH
T
 
A

Andy Fish

as a follow up I would say it's a really bad idea to leave a database table
locked between requests. you have no idea what the user is going to do or
how long it will take him to respond.

obviously I can't comment on your specific application, but I would
generally try to avoid this scenario

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top