Solved

How to expel users from a database

Posted on 2011-09-30
8
164 Views
Last Modified: 2012-05-12
How can you use code to expel all users from a database?
0
Comment
Question by:Milewskp
  • 4
  • 3
8 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 36893217

I took Peter's FSD free app (http://www.peterssoftware.com/fsd.htm) ... and rolled it into a full blown app that works very well.

And related is this:

http://www.peterssoftware.com/isd.htm

These two will definitely do it for you.

mx
0
 
LVL 1

Author Comment

by:Milewskp
ID: 36893364
Thanks mx,
I use the same method described in the first link you provided to kick users out. It's surprising how similar the two are.

The second link you provided is about how to kick out inactive (stale) users. I was planning to use the same idea for my databases, but I believe I now have a better idea: Instead of kicking out stale users, I plan to put the database in sleep mode:
- A modal pop up form called Sleep Mode opens to tell the user the database is sleeping.
- All linked tables are converted to local tables with one record each (to prelude the database from getting huge).
- Any persistent connections that were established to other databases are broken.

If the user hits the Wake Up button, then
- The tables are converted back to linked tables.
- Persistent connections are re-established (for speed).
- the current form is requeried.
- the Sleep Mode form closes.

The database will close at midnight regardless of what the user does.

Of course, this method applies only if each user has their own front end.
0
 
LVL 75
ID: 36893582
Sounds interesting ... and it's sure making me sleepy just thinking about it :-)

mx
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 30

Expert Comment

by:hnasr
ID: 36895091
One simple Idea:

a table in the database, to schedule for closing the database.

User's copy processes a timer event every say 5 minutes.
Reads the table and checks for close time.
Warns the user to exit the application.
New users are not allowed to enter.
At the right time, a force exit is issued if user did not respond.
0
 
LVL 1

Author Comment

by:Milewskp
ID: 36902960
Hi hnasr,
I think that's basially what http://www.peterssoftware.com/fsd.htm does. Maybe the reason we are all coming up with the same answer is that there really is only one good way to do it.
0
 
LVL 75
ID: 36904599
Peters app works! Guaranteed.

mx
0
 
LVL 1

Author Closing Comment

by:Milewskp
ID: 36904682
Thanks mx!
0
 
LVL 75
ID: 36904714
You are welcome.

mx
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Office 365 home questions 7 65
Display label on subreport when NO DATA on subreport 4 22
Question about DB Schema 27 56
Problem copying record details to a new record 5 9
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question