Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get SQL results containing only Locked Records?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00201123
Message ID:
00201243
Views:
13
Matthew,

Believe it or not, SELECT * FROM mytable WHERE !RLOCK() actually seems to work. If you have multilocks on it will lock all the records in the table that it can. If it's off it seems to keep the lock on the last record of the table, which makes sense. You could SET REPROCESS TO 1, SET MULTILOCKS OFF, and use UNLOCK ALL after the query. I don't know that I recommend this method, but it does seem to work.

>Thanks again. We're talking about less than 1000 records and the update frequency isn't of the highest importance. This strategy would not work in a transactional business situation.
>
>The main reason for the question is to display a list of current system users. My security model allows for limiting the number of concurrent users based on a record locking scheme. The nice thing about security limiting based on a record lock is that if user "A" turns their PC off without exiting your application, the record lock is released and the next time they login to the app, the don't have to go groveling to their Sys Admin to unlock their account.
Previous
Reply
Map
View

Click here to load this message in the networking platform