Session Variables

J

Johnd

Is there a server-side event that fires when the session variable expires
that i can trap and do something with (ie renew the session Variable or say
run an asp to update a database)

John,
 
J

Johnd

I am trying to control record locking by assigning a field in a table to the
username when they log in. Then if any other user logs in, they get an
error that "john is editting this record". I have the locking working the
way I want, but the unlocking is posing a significant issue. I have added
the "onunload" event to the page which runs an asp that basically sets the
field to "" (essentialy unlocking it) however it doesn't seem to fire every
time. The result is that I get records left locked open. I thought i might
be able to fire an event on the server when a session variable expires that
will unlock the associated record.

Any thoughts?

John

Some background info:

Advantage server for Novell (.dbf files)
 
R

Ray at

So, if John loads a page:

editrecord.asp?recordid=4

and then Jeff loads that same page, you want Jeff to see "John's editing the
record."

You should be able to handle this in Session_OnEnd, but instead, what you
might consider doing is tracking the time that a user opens the record also.
So, if John opens the record, stick his name in your column, but also put
the date and time in there. So, when you load the page and execute your
query to get that record, if there's a name in the column, but the date and
time are 45 minutes old, let the new person edit. If it's only a couple
minutes old, return back that John's editing it.

I'd maybe try something like that in conjunction with session_onend as well
as ensuring that the values are deleted when the person submits the changes,
of course.

Ray at work
 

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
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top