Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there a way to count locked records?
Message
De
20/11/1997 23:16:28
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00061540
Message ID:
00061552
Vues:
40
This is from the help for SYS(2011):
"SYS(2011) returns Exclusive only at the workstation that opened the table exclusively, and Record Locked only at the workstation that applied the record lock."

Since you can use SYS(2011) just for the records locked by the current workstation, this seems to be a little useless even if the table would not be too big. If this is what you want, you better keep a record of all locked records and have the figure available all the time. But I doubt this is what you need. :)

Vlad

>>Gilberto, could you use Sys(2011)? It will give you the information you want, but I can't think how to use it except by checking every record....
>>
>>Barbara
>
>Barbara, I just tried using sys(2011) like this:
>
>USE CUSTOMERS &&with 150,000 records
>SET multilocks on
>GOTO 1200
>=rlock()
>GOTO 10000
>=rlock()
>GO top
>
>DO while .t.
> lcVar = sys(2011)
> IF upper(lcVar) = 'RECORD LOCKED'
> WAIT WINDOW 'Found one, continue: ' to cValue
> IF upper(cValue) = 'N'
> RETURN .f.
> ENDIF
> ENDIF
> Skip
>ENDDO
>CLOSE all
>
>and yes, it takes too much time, so if you find or hear a different way please let me know.
>
>Thanks,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform