Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to count locked records?
Message
From
21/11/1997 07:57:42
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00061540
Message ID:
00061568
Views:
31
>>>I know we can lock, unlock, set multiple locks, and so on, now, can we actually count how many records are locked in a networked table? If I were to issue a command such as COUNT TO N FOR RLOCK() = .F. woudn't I be locking records as I'm counting?, it would make sense to me...then what would be the proper way to do this?
>>>
>>>Thanks, ladies and gentlemen...
>>
>>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, after all I tried your suggestion and it worked! I tried this with 150,000 records and it took 15 seconds to bring back the result!
>
>SET multilocks on
>GOTO 1200
>=rlock()
>GOTO 10000
>=rlock()
>GOTO 50000
>=rlock()
>GOTO 100000
>=rlock()
>GOTO 130000
>=rlock()
>
>count to n for sys(2011) = 'Record Locked'
>
>?n
>
>Thanks!

But this will count only the records locked by the station that sets the locks. The records locked by other stations/users are not seen. Is this good for your traffic statistics?

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform