Log off Users Automatically

D

Doug_C

Hello!

I was wondering if there is a simple way to automatically log off users who
are using the database so that I can make updates?

One of my databases will be viewed by people outside of my department and If
I need to make updates, it would be extremely difficult to know who is using
it. I would like to come up with something to warn them that the database is
going to shut down in 5 minutes and then it will automatically shut down,
this will give them a heads up. Then once I finish my updates, reset
something to make it active again. I hope this makes sense.

Thank you!!
 
K

Klatuu

You will need a table in your database with a record/field that your code
will understand whether or not the backend database is available.

You will need a form that never closes until you close the application. It
should also be the form that opens when you start the application. It the
form's Load event, you will need to check the value in the field to see if
the database is available and take the appropriate action. This form should
also start a timer that will check the field value periodically. In the
Timer event, if it find the field value says to log everone out, present a
message box, and reset the timer. When the time expires, close the
application.

You can set the value in the table however you want to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top