Connecting Tech Pros Worldwide Help | Site Map

Passive Shutdown

ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,214
#1   Jul 21 '07
Passive Shutdown is a little known, Jet 4 enabled feature that allows you to prevent Users from connecting to a Database. It is also known as Connection Control. This feature is referred to as 'Passive' since there is no way to forcibly boot Users out of a Database. This can be a very useful feature if you want to limit the number of simultaneous Users of a Database or you want to perform some administrative task, such as Backup.

You control Connections using the Jet OLEDB: Connection Control Property of the ADO Connection Object. To disallow any new Users of the Database, set the Property to 1. To revert back to allowing new Users, set the Property to 2. A simple code demonstration will dramatize the use of this Property.
Expand|Select|Wrap|Line Numbers
  1. 'Initiate Passive Shutdown - do not allow new Users
  2. CurrentProject.Connection.Properties("Jet OLEDB:Connection Control") = 1
Expand|Select|Wrap|Line Numbers
  1. 'revert to original setting and allow new Users
  2. CurrentProject.Connection.Properties("Jet OLEDB:Connection Control") = 2
NOTE: The Error Message that Users will encounter when trying to connect to a Database that has been Passively Shutdown is: The database has been placed in a state by user 'user name' on machine 'machine name' that prevents it from being opened or locked.



Newbie
 
Join Date: Oct 2007
Posts: 2
#2   Oct 3 '07

re: Passive Shutdown


Quote:

Originally Posted by ADezii

Passive Shutdown is a little known, Jet 4 enabled feature that allows you to prevent Users from connecting to a Database. It is also known as Connection Control. This feature is referred to as 'Passive' since there is no way to forcibly boot Users out of a Database. This can be a very useful feature if you want to limit the number of simultaneous Users of a Database or you want to perform some administrative task, such as Backup.

You control Connections using the Jet OLEDB: Connection Control Property of the ADO Connection Object. To disallow any new Users of the Database, set the Property to 1. To revert back to allowing new Users, set the Property to 2. A simple code demonstration will dramatize the use of this Property.

Expand|Select|Wrap|Line Numbers
  1. 'Initiate Passive Shutdown - do not allow new Users
  2. CurrentProject.Connection.Properties("Jet OLEDB:Connection Control") = 1
Expand|Select|Wrap|Line Numbers
  1. 'revert to original setting and allow new Users
  2. CurrentProject.Connection.Properties("Jet OLEDB:Connection Control") = 2
NOTE: The Error Message that Users will encounter when trying to connect to a Database that has been Passively Shutdown is: The database has been placed in a state by user 'user name' on machine 'machine name' that prevents it from being opened or locked.


Hello,
I was wondering if this action could be taken accidentally by a user that has no authority to put the database in this state?
I encountered this error just the other day and it was coming from a user that has limited user rights. I asked the user to shut down/log off and I was then able to log on to our database. But, I was puzzled as to why myself and another user was receiving this error message.
Any thoughts or help would be appreciated!
ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,214
#3   Oct 3 '07

re: Passive Shutdown


Quote:

Originally Posted by klowell

Hello,
I was wondering if this action could be taken accidentally by a user that has no authority to put the database in this state?
I encountered this error just the other day and it was coming from a user that has limited user rights. I asked the user to shut down/log off and I was then able to log on to our database. But, I was puzzled as to why myself and another user was receiving this error message.
Any thoughts or help would be appreciated!

Quote:
I was wondering if this action could be taken accidentally by a user that has no authority to put the database in this state?
Yes, if the User can execute this code, they can put the Database in that state. This code should be placed in an area, perhaps a Command Button on a Form, a Macro, etc. for which only Administrators have Permissions.
Quote:
I encountered this error just the other day and it was coming from a user that has limited user rights. I asked the user to shut down/log off and I was then able to log on to our database. But, I was puzzled as to why myself and another user was receiving this error message.
This Error is not only generated when the Database is in a Passive Shutdown state, but it can result from other causes as well.
Newbie
 
Join Date: Oct 2007
Posts: 2
#4   Oct 7 '07

re: Passive Shutdown


Quote:

Originally Posted by ADezii

Yes, if the User can execute this code, they can put the Database in that state. This code should be placed in an area, perhaps a Command Button on a Form, a Macro, etc. for which only Administrators have Permissions.

This Error is not only generated when the Database is in a Passive Shutdown state, but it can result from other causes as well.



Thank you very much for your information, may I ask another question though...? What other causes could this error result from? I know the user I am speaking of has no knowledge of inserting a code into a form or any other area for that matter. I am just hoping that our database is not corrupt in some manner.
Thanks again for your quick response!
ADezii's Avatar
Expert
 
Join Date: Apr 2006
Location: Philadelphia
Posts: 5,214
#5   Oct 7 '07

re: Passive Shutdown


Quote:

Originally Posted by klowell

Thank you very much for your information, may I ask another question though...? What other causes could this error result from? I know the user I am speaking of has no knowledge of inserting a code into a form or any other area for that matter. I am just hoping that our database is not corrupt in some manner.
Thanks again for your quick response!

Off the top of my head, if you have a Database opened and minimized on the Taskbar, and then you attempt to re-open it again, you'll get this Error.
Reply