Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding who has a file open
Message
De
13/11/1998 12:47:21
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00157195
Message ID:
00157470
Vues:
18
>I use a tequinique similar to the one you've mentioned. I've been handling >abends by adding a timer to the app that fires every 30 seconds or so to >refresh the user information. This way I can clear all the 'logged in' flags, >and wait a little while and see who's currently running the application. There >are a few drawbacks (users opening tables outside the application via Crystal >Reports is one) but so far, I haven't found a better solution.

Ken,

So who actually deletes the old records in teh case of an ABEND? and what do you use as a PK for the table (I was thinking their network number..). I was thinking this:

startup:
scan table
if record found for this address num
if datestamp older than 5 minutes
delete the record - ABEND
else
signal an error, app running, and exit
endif
endscan
append a record with this netnum, and DATETIME()

every 5 minutes:
scan table, find record
update datetime()

at exit:
scan table, find record
delete record


The only problem left is if a user abends, and does not start it up again, all users see a record for joeuser. I'd like some process to periodically clean all records older than 5 minutes.

Would that work as a filter? set filter to datetime field < 5 minutes old

Tim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform