Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ISRLOCKED(), Reference Integrity Store Procedure and mor
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00052816
Message ID:
00052825
Vues:
38
>Hi to all,
>
>I'm developing a multiuser application with VFP 5, and I'm working on a
>lock problem.
>On the workstation A I do this code
>
>USE myTable IN 0
>SELECT myTable
>
>RLOCK("1", "myTable") && It return .T.
>ISRLOCKED(1) && It return .T.
>
>while the record 1 is locked I go at the workstation B and I do this code:
>
>USE myTable IN 0
>SELECT myTable
>
>ISRLOCKED(1) && It return .F. <<<< ????
>RLOCK("1", "myTable") && waiting for lock ........ and
>return .F. (ok record locked by workstation A)
>
>Why ISRLOCKED() has returned .F. ? Maybe ISRLOCKED and SYS(2011) return
>only the lock status modify by my workstation ? Documentation doesn't say
>it !
Marco,

ISRLOCKED() tells you if the station the fucntion is called on has a record lock on the record. If you want to know if another station has the record locked you use the RLOCK() function;

IF RLOCK()
* You got the lock so no one else had it
ELSE
* Soemone else has the lock so you can't get it
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform