Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hiding the DOS Command Prompt
Message
De
26/09/2002 00:28:11
Michael Ouellette
Australian Technical Services (VIC) Pty
Australie
 
 
À
25/09/2002 09:50:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00682911
Message ID:
00704560
Vues:
40
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform