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:
00758842
Vues:
25
Does...

LOCATE FOR NOT ISRLOCKED() WHILE NOT EOF()

... work for you? By including the WHILE, the LOCATE begins its search at the current record instead of at the first record.

>I’m trying to locate the next available unlocked record in a table.
>The table has about 150 records in it.
>
>When I use following code it may take 30 seconds if the 31 record is next available unlocked record and rLock() will return .T. but it is slow
>
>Sele the table
>scan
> IF rlock() = .t.
> ?rlock()
> endif
>endscan
>
>
>if I use this code it flies thru the isRlock function but will get .f. when it tries rLock()
>
>Sele the table
>scan
> IF isRlock() = .t.
> ?rlock()
> endif
>endscan
>
>What is the fasted way to do this?
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform