Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine Current Users
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00603982
Message ID:
00604378
Views:
21
>Is there a simple way for a VFP6 application to determine how many other users on the network have the database or any specific DBF open, as well each of their NT userids?
>
>One way is to create a network table (login.dbf) and everytime someone opens the app, they create a record in that table and lock that record. Then to see who is in the application you scan the table and look for locked records [Not Rlock()]. The only exception is yourself and you check that via ' LOCKED'$UPPER(SYS(2011)). Make sense??
>
>Kevin

To do it right, this is less easy then expected, because the Rlock() -which you have to use in order to check the others' records (thus free them again)- consume too much time. I'm not sure you (Kevin) meant that Rlock() shouldn't be used at all (but then how to do it ?).
So note that an Rlock() for -say- 50 user-records take 0,1 sec per Rlock() (test it, this can be the response easily), you are in trouble.
Solve this by carefully reading the Help on Reprocess, and expect the ON ERROR to be involved ... (with an On Error active, all is different -> faster).

HTH for now,
Peter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform