Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding who has a file open
Message
 
À
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:
00157499
Vues:
16
>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


Well, in my case I have a refresh button on the form that displays the user info which clears the flags and refreshes the data. I think your datetime() field with the filter may be a better approach since it eliminates the need to clear record flags. I use the sys(0) function to identify the user.

I wouldn't delete the records, but recycle them. IE: Only add a new record if the user doesn't have one. In my case I'm using the same table I use for user access/security. I'm using a simple integer field to flag where they are in the application (which module).
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform