Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding the DOS Command Prompt
Message
From
26/09/2002 00:28:11
Michael Ouellette
Australian Technical Services (VIC) Pty
Australia
 
 
To
25/09/2002 09:50:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00682911
Message ID:
00704560
Views:
39
I've used a technique where each user who opens the program get his own resource file. IE: set resource to rr+"userid"

I loop through all resource files and see if I can open all the users resource files through low level file functions. If I can't, then someone is definitely logged on.

I suppose you could use this technique to open all tables...

Cheerio

*********************
use users
GO TOP

SCAN
l_resfilename='RR'+ALLTRIM(userid)+'.dbf'
WAIT WINDOW "Checking if "+ALLTR(users.name)+" is online" NOWAIT
IF FILE(l_resfilename) AND users.userid # _cuserid && check resource file
l_lockresfile=FOPEN(l_resfilename)&& try to open using low level function
IF l_lockresfile>=0 && if sucessful...
=FCLOSE(l_lockresfile) && close it
IF logged='Y'
WAIT WINDOW "Clearing logged flag" NOWAIT REPLACE logged WITH ' '
ENDIF
ENDIF
ENDIF
ENDSCAN

RETURN
Previous
Reply
Map
View

Click here to load this message in the networking platform