Samual,
You can have one table that has all the locking information for *all* tables. When a lock occurs, store the table name and the primary key of the table, along with user, timestamps, and other information.
Doing this requires no modification of existing tables. Also, to clear locks (at night, for example), a routine only has to look in one table to see what records are "locked".
>Hi Kamil,
>I've taken the hang problem into consideration.
>In my idea, if the computer hangs, the locked record will allow edit again in 3 ways:
>1) allow the same user to re-login to edit the locked record
> again regarding the locking flag.
>2) allow any other user to edit the locked record if it
> has been locked for over a period, such as over 3 hours.
>3) add function to unlock the record manually.
>to do above function, I need three more fields to record
>the locking status: locked, locked_by, locked_at
>
>Do you have any other comment?
Steve Gibson