Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do you lock a record fast?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00758830
Message ID:
00759247
Vues:
18
Mike,

IsRlock only tells you if YOU have a lock. Rlock() is the only way to find out if you can lock the record. This si how I would approach it;
SELECT TheAliasIWant
* This scan loop will attempt to lock each record until is gets one it can lock, 
* then it locks that record and exits the loop.  If cannot lock any records the 
* loop will end when all records have bee tried, then the IF after the endscan 
* will find that the current record is NOT locked by this station and you can 
* act appropriately.
SCAN WHILE NOT RLOCK()
ENDSCAN
IF IsRlocked()
   * We locked a record
ELSE
   * We did not find a record we could lock
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform