Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RLOCK
Message
 
 
To
02/11/2001 12:24:56
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: RLOCK
Miscellaneous
Thread ID:
00576665
Message ID:
00576854
Views:
31
>>>> So on app startup, you'd have to go in and clear out the info for the current user, but assume the rest of the info is accurate and leave it alone.
>>>
>>>Something along these lines would work. When each user enters the application, it could record the UserID and the macAddress (or something to identify the workstation) in a 'loggedIn' table . If the users machine locks up, when the user logs in again, it would know that a session was terminated abnormally (because a normal program termination would remove the session information from the loggedIn table). The program would then clear all locks from the user's previous session. This would be accomplished with one REPLACE statement.
>>>
>>>If the lock information is stored in each table, it would be much more difficult to clean up after an abend.
>>
>>What if a user doesn't login after that for hours or days?
>>
>
>First of all, in a pessimistic scheme, the issue is whether or not VFP would be able to successfully obain an RLOCK(). RLOCK() would always be boss (would be done first):
>
>
>IF RLOCK('tableName')
>    * check for any other references to this record in rlocks table,
>           * remove them if they exist...
>    * add entry to rlocks table
>ELSE
>    * query rlocks table to find out who has record locked
>ENDIF
>
>
>I'm not saying that I'm am in favor of the pessimistic record locking method. However, for those that have made that choice, I am simply proposing a simple method for keeping track of who locked each record.
>
>What do you think?

Yes, it should work.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform