469,579 Members | 1,188 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Share your developer knowledge by writing an article on Bytes.

Passive Shutdown

ADezii
8,800 Expert 8TB
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.
Jul 21 '07 #1
4 12731
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!
Oct 3 '07 #2
ADezii
8,800 Expert 8TB
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!
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.
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.
Oct 3 '07 #3
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!
Oct 7 '07 #4
ADezii
8,800 Expert 8TB
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.
Oct 7 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Martin Robins | last post: by
reply views Thread by Allan Bredahl | last post: by
8 posts views Thread by Bill Sonia | last post: by
1 post views Thread by Titeuf | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.