Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Nightly shutdown for reindexing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00428127
Message ID:
00428135
Vues:
37
I have done something similar to what you are talking about (I think). I have a need in one of my applications to have all users logged out so that an export can be done. Basically I have a table that has 1 field called AppLocked. This can hold a 1 for Yes, locked out or 0 for No. On the main form of the application I have a timer set up to check this value every so often. If the app sees that the value in this field is a 1, it gives the user a 5 minute period to finish their work and log out (after being warned). If they are still in the application after this time then the application automatically shuts them down doing a CLEAR EVENTS after any other processing I might need to do. It works like a charm. Also, if you are using native VFP tables (which it sounds like you are) I believe there is an application that has been posted that does something like this.

HTH,
George


>We have a large VFP application used by about 50 users. The data is on NT 4.0 servers, and the desktops are all NT 4.0 or Win2000.
>
>Each night, we'd like to shut down to do some reindexing, add fields, or other maintenance chores. It's not a given that we'd want to do this stuff every night, but I'd like to set up a standardized approach that allows exclusive use of the tables between, say, midnight and 3:00AM. Then we can schedule and launch whatever code we'd like to see run each night, knowing that code can get exclusive locks to do what needs to be done.
>
>It's the age-old problem, though: users forget to exit the VFP app and go home at night, leaving a form up with a table open. Most of our forms are pretty careful about this and don't leave tables open needlessly, but there's still a chance that a table could be left open.
>
>So what's the best approach? I'm considering using NT's built-in ability to limit login hours, but I'm not sure whether that will trash a CDX (or worse) if a user's connection is cut when they have a table open. If we do it this way, do we need to always re-create all indexes "just in case"? I've also tried implementing a timer that would exit the app at a specified time, but we ran into some weird behavior with that approach when a modal form is active.
>
>Anybody have an approach to this issue that rocks? I'd love to hear about it.
>
>- Doug
Everything we see or seems
Is but a dream within a dream
- Edgar Allen Poe
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform