Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preventing users from accessing tables
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00746351
Message ID:
00746360
Views:
23
>What is the best way to prevent someone from accessing tables if you want to make an emergency DB change that requires exclusive access? I heard of ways of adding timers to forms that constantly check for a file, then exit the app if it's there (to boot users from system). This doesn't seem that effective.

I have a "status" table in my DBC where I have a field called DBLocked which is logical. If this value is true, my app will not let the user complete the app launch, give the user a notice to try later [after db maintenance] and will quit the app. You can then have a timer in your app periodically check this status code and warn the user to exit immediately or risk losing their work. An additional field in this status table can be the time of day they have to be out by before they are forcibly kicked out. You can have your app automatically shutdown the app at that time if they do not exit. Otherwise, you have to go around and kick them out or go to the server and terminate their connection. Other than that, there is not much else you can do.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform