hi,
I would like to lock a record so that when one user is modifying a
particular record, then it is locked for all other users. For this
purpose, I have two fields in every table ("LockedBy int null", which
contains the UserID of the editing user and "LockedSinc e int not
null", a timestamp).
My current logic is: when the user enters the form to modify a record,
lock it (set LockedBy=$UserI D). when the user presses the submit-button
to commit his/her changes, unlock the record.
The problem with this is that the user may press fwd+back buttons of
the browser. So either I find a way to disable these in the
editing-forms or I need to find a different way to do this
Of course I could use a timeout (by using LockedSince-field) for cases
where one form has been locked for > 2 hours, but that alone is not
enough (I can't always lock records for that long!)
thanks in advance,
--
Felix Natter
I would like to lock a record so that when one user is modifying a
particular record, then it is locked for all other users. For this
purpose, I have two fields in every table ("LockedBy int null", which
contains the UserID of the editing user and "LockedSinc e int not
null", a timestamp).
My current logic is: when the user enters the form to modify a record,
lock it (set LockedBy=$UserI D). when the user presses the submit-button
to commit his/her changes, unlock the record.
The problem with this is that the user may press fwd+back buttons of
the browser. So either I find a way to disable these in the
editing-forms or I need to find a different way to do this
Of course I could use a timeout (by using LockedSince-field) for cases
where one form has been locked for > 2 hours, but that alone is not
enough (I can't always lock records for that long!)
thanks in advance,
--
Felix Natter
Comment