DB Clear Down (1 Viewer)

Steve Bremner

Registered User.
Local time
Today, 21:24
Joined
Jul 16, 2003
Messages
34
Is there anyway, I can clear all users out of a database?
For example, I have made some changes on my test DB, and now I want to implement the changes in the live system.
However some users are on the DB.
Can I force them of with some kind of pop up message telling them whats going on? :confused:

Cheers

Steve
 

Kevin_S

Registered User.
Local time
Today, 16:24
Joined
Apr 3, 2002
Messages
635
Yep - search the forum for "remove users", "force users out","exit users",etc... There have been numerous posts on this topic... as an example of the power of forum searching click here

HTH,
Kev
 

Steve Bremner

Registered User.
Local time
Today, 21:24
Joined
Jul 16, 2003
Messages
34
I have had a look at that particular thread.
Unfortunatly this specifically looks at timing out a users session.
I'm looking to be able to pick a user that is logged on, and forceably kick them out.
I have had a good search but still no ideas.

Any other suggestions?
 

mousemat

Completely Self Taught
Local time
Today, 21:24
Joined
Nov 25, 2002
Messages
233
I know this is old fashioned but it normally works:

Can you not ask them to log out of the database. At least that way they are aware of what is happening. If you justy log them out they may not have saved their particular record or they may try to get back into the database and worse still your phone will be red hot with users trying to find out whats happened.

Just a suggestion
 

Steve Bremner

Registered User.
Local time
Today, 21:24
Joined
Jul 16, 2003
Messages
34
Problem is with that, there will be a substantial number of users using the database at any one time.
I give them the option to login, but I don't have anyway of keeping track of who is logged on at any one time.
If I could even make a pop up box appear on all users screen at once it would be good.
Some kind of messenger service. :confused:
 

mousemat

Completely Self Taught
Local time
Today, 21:24
Joined
Nov 25, 2002
Messages
233
Ok point taken

Depending upon how your network is set up, you can send everyone a message through the network.

NETSEND is one such application, go to nonags.com there are lots of freeware programs to send messages over the network
 

Steve Bremner

Registered User.
Local time
Today, 21:24
Joined
Jul 16, 2003
Messages
34
This is another good idea, and do-able, but I am on a corporate WAN with over 35000 users.
There is no way I can extract there NT ID and net send it accuratly.

I suppose I could, however most of the dumbasses here would end up shutting the machine down rather than the DB.
If I could just figure out some way to run a Msgbox for all current users I would be happy.

Damn my idealistic ways!! :D ;)
 

Kevin_S

Registered User.
Local time
Today, 16:24
Joined
Apr 3, 2002
Messages
635
Steve -
Is your app client/server with the tables somewhere you can get access to them? If so you could change your db slightly in that when a user logs into the db you write their user name and time of log in to a table (tblUserLog). Then when they exit simple run some delete sql to remove them from the table - this way you will always know who is logged in at anyone time. ALso with this method you can then send email to them asking them to log out to preform maintenance. I have a db set up like this for a few apps and it works really well.

As an example of this: I have a module that looks for the SQL Server 2000 linked tables on start-up.. if the tables are there the code exits and the db operates as usual - if the tables are missing (i.e. I have disconnected the tables to preform maintenance or make changes) the module opens a form in the FE that says "This application is having maintenance preformed on it and will be unavailable for a short time - please check back later" and then exits... all of this is based off the tblUserLog.

HTH and provides a few ideas,
Kev
 

ghudson

Registered User.
Local time
Today, 16:24
Joined
Jun 8, 2002
Messages
6,195
Steve Bremner said:
If I could even make a pop up box appear on all users screen at once it would be good. Some kind of messenger service. :confused:
To use Net Send, you need to be able to call this command from Access...

C:\WINDOWS\system32\net.exe send CompterNameHere Hello!

Here is how I do it within Access...

SendMessage = "cmd /c net send " & CompterNameHere & " " & UserName & " states: " & txtBriefMessage
Call Shell(SendMessage, vbNormalNoFocus)

You will need to store the users Computer Name and User Name in your db. Use the Environ function to do that.

Public Function ComputerName()
MsgBox Environ("ComputerName")
End Function

Public Function UserName()
MsgBox Environ("UserName")
End Function

That should be enough to get you started.
 

Steve Bremner

Registered User.
Local time
Today, 21:24
Joined
Jul 16, 2003
Messages
34
Thanks Kev, I'm afriad I'm not to sh*t hot so may need some guidance if you have the time?
 

bone head

Registered User.
Local time
Today, 21:24
Joined
Feb 11, 2002
Messages
73
Hi
i had the same problem a few weeks ago, and ended up using a table which you can set the time to automaticly log anyone out.

how it works is say you set it for 30 minutes, it will flash up warnings at various intervals to warn users and at the given time will shut down the database.

if it is any use to you let me know and i will let you have what we have.

Hope this may help

Paul
 

Users who are viewing this thread

Top Bottom