Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Packing
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00187755
Message ID:
00187773
Views:
20
>That's what I think should be done but I've had no success trying to close the tables. I've tried close database all and close tables.

Private datasessions? Modal form doesn't know about tables opened by private datasession of calling form?

FWIW, I have a menu bar for Reindex which calls no forms, and is disabled if there are any open forms. This avoids problems with open forms needing to be closed, possibly needing to ask the user whether to save changes before closing, etc. That could all be handled but I did it the lazy way.

The reindex routine loops through an AUSED() array, attempting to use all the tables exclusively. When finished, it runs through the loop again, using all the tables shared.

This requires the assumption that all tables are opened at start of app--which is a valid assumption in an app I wrote myself.

It also depends on my scheme to allow a supervisor to lock all users out of the system. At the very start of the reindex routine, a routine is called which attempts to open the User table exclusively. If successful, the routine to use all the tables exclusively is then called.

If the supervisor can't get exclusive use of the User table, there's another loop which checks which users in the table have their record locked (which is done at app startup), placing these users' name and extension into a grid. The supervisor can now tell these people to get out, and keep refreshing the grid until they have everyone out and get exclusive use of the User table.

Of course there's also code at the start of the app which tries to use the User table and, on error 1705, tells the user the supervisor currently has users locked out.

HTH,
Rich.
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing
Previous
Reply
Map
View

Click here to load this message in the networking platform