Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing for lock without locking
Message
De
11/11/2004 11:42:49
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Versions des environnements
Visual FoxPro:
FoxPro Windows
Divers
Thread ID:
00960484
Message ID:
00960486
Vues:
8
This message has been marked as the solution to the initial question of the thread.
Rick,

Check out SYS(2011).

HTHs,

>I'm real sure I know the answer to this, but I hope I'm wrong.
>
>Is there any way to test a record to find out if it is NOT locked?
>....without locking the record as a result/consequence of the test...
>
>In the past I've always tested to see if I could get a lock... like this...
>
>IF RLOCK()
> *locked achieved
>ELSE
> *could not lock - implies that someone else has the record locked
>ENDIF
>
>But what I need is to know if someone else has the lock...
>I suppose I could do something like this...
>
>IF RLOCK()
> *locked achieved
> UNLOCK
>ELSE
> *could not lock - implies that someone else has the record locked
>ENDIF
>
>...but that seems wrong and if the timing is just so, could leave me with the same problem I'm tryin to address...
>
>
>The problem I'm trying to address is that I have a user who created a record
>(the record was created with an Append Blank)
>edited the record in one of my screens and clicked the OK button...
>The Code in the OK button failed on a GATHER statement with the message
>"Record is in use by another."
>
>How is that possible????
>And more importantly... What can I do about it????

>
>TIA,
>Rick Liebespach
Jim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform