Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi User Database 1

Status
Not open for further replies.

madrappin

Technical User
Mar 16, 2004
68
US
I have a database set up on a network server. Its not split up or anything, just some basic user level security. My problem is when I need to create a new report or change the table I need to have the other users all logout. Is it possible to administratively log them out of the database?
 
First of all this is a common problem for all of us and there are a number of threads here at TT that already instruct you how to log off your users. I will search for them and post them to this thread. In the meantime here is a thread that will help you view just who is logged onto your database.


This helps in just identifying on a server based system who to call up and tell to get off the system.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
What Bob is suggesting is to consider splitting your database to a backend with only data, and the front end with the forms, queries, reports and modules.

You will still have all users exit the database to make changes to the table / database design, but now you can make changes to forms, reports, etc without impacting data integrity.
 
I can't seem to find the thread that I was thinking about so I will just describe the method that I have used in the paste.

I usually have a table in my server database that has one record and I can create database flags and parameters to be used to adminster the database functions. I call this table tblDBParameters. After creating one record with an AutoNumber field called RecCounter, create a field called Logout_Time(Date/Time).

Each time a user logs on I have the AutoExec macro open an invisible form in addition to the main menu. This form has no control and is just an inch square and I situate it in the upper left of the screen. No one will see it. In the OnTimer event of this form I have the following code example:

Code:
If Not IsNull(DLookUp("Logout_Time", "tblDBParameters")) then
   If DLookUp("Logout_Time", "tblDBParameters") <= Time() then 
        MsgBox "You are being shutdown by the adminstrator"
        Application.Quit
   else
        MsgBox "The system will shutdown in less than 5 minutes"         
   End If
End If

Set the forms TimerInterval to 60000 ms( 1 minute ). This form will monitor your table and field to see if you have entered a time for shutdown. If it is left with a null value that it just allows the user to continue working.

Now you can create a custom form or just allow the administrator to have access to the table and update the date/time field and put in the time for shutdown. Now this example used 5 minutes as the lead time to shut them down. You can get sophisticated by just having a form and the Administrator types in a number and the table is updated with the current time + the number entered. The msgbox can be modified to tell the user the exact time the app will shut down also instead of just the stand 5 minute sg. Remember that after the adminstrator fixes whatever is necessary he just null out the time field in the table.

This is a simple explanation but it works and is effective.

Post back if you have any questions.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Thanks willir, my thoughts exactly. Maddrappin, you should seriously consider doing this. What has been described by willir is considered to be the accepted network server database design structure. This way you can makes releases of your programming changes to just download to the FE without having to have everyone out of the system just to make the changes.

[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
awesome. i will try those methods out. just knowing exactly which users are logged on is probably enough for me. but i will try out those methods. thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top