Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Who has the record locked?
Message
De
10/12/1997 12:43:59
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00064802
Message ID:
00065052
Vues:
43
>>>>>No misunderstanding on your part. I ran into the same problem and now avoid the function altogether. Use IF RLOCK() instead. Related to your original question, you stated your need was more for administrative purposes instead of app purposes. What kind of admin are you talking about?
>>>>
>>>>Not Admin, troubleshooting. Occasionally, some 'administrative' routines that need to lock the table cannot get a lock. As I have a _LOT_ of code out there operating on the tables in question, I can't figure out which user, (or routine) has which record locked.
>>>>The only reason I didn't want to use IF RLOCK() then UNLOCK is because of speed. RLOCK() takes about 6 times longer than ISRLOCKED(), but now it doesn't look like I have a choice.
>>>
>>>
>>>If the troubleshooting is not to time consuming have you considered having functionality in your forms to automatically exit the user and disallow rerunning until you are finished?
>>
>>I wouldn't have a clue as to how to kick a user out of a form from another process. The only session that can unlock a record is the session that locked it in the first place.
>
>I read about something like this and it was done this way:
>
>1. You put a file on the network. i.e. MAINT.MEM
>2. A timer in the form would check for the existance of this file every 5 minutes.
>3. If found the user would be told that the system would be shutting down for maintenance in 5 minutes and to save work and exit.
>4. A property (i.e. mlshutdown) would be set to true.
>5. The next time the timer fires it detects the file and the property set to true and executes your shutdown code.
>
>The load of the form could also check for the file to prevent loading the form. When your work is complete, remove the file.
>
>HTH

Interesting... thanks for the idea. It might be something I'll want to implement in the future.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform