473,434 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,434 developers and data experts.

Passive Shutdown

ADezii
8,834 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 14240
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,834 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,834 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

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

Similar topics

8
by: Jonathan Heath | last post by:
Hi all, I have created an ASP script that enters data into an Access Database. My problem is that I'd like this script to run when the computer is shutdown or the user logs off. I think...
2
by: Martin Robins | last post by:
I know this is not really the right forum for this topic, but I figured there are a lot of people here who may be able to provide me with an answer to my question so I would give it a try. About...
0
by: Allan Bredahl | last post by:
Hi All I am trying to construct an application that is able to cancel a machine shutdown, reboot or logoff. And after performing some stuff to perform the original shutdown order :...
3
by: Senthil | last post by:
Hi, I would like to know the code for reboot and shutdown windows xp professional using VB.Net. thanx Senthil
8
by: Bill Sonia | last post by:
I've written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that for OnShutDown, once my...
4
by: Chris Tanger | last post by:
Context: C# System.Net.Sockets Socket created with constructor prarmeters Internetwork, Stream and TCP everything else is left at the default parameters and options except linger may be changed...
2
by: Brian Worth | last post by:
I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0 was able to shut down or restart the (windows XP) machine using a series of API calls. (Getlasterror, GetCurrentProcess,...
1
by: Titeuf | last post by:
Hi, I work under VS2003 and I want to know how get the shutdown reason code ? On msdn nothing found...No api :( Have you an idea ? Thank's
5
by: Phil Tusa | last post by:
Greetings to all .... I have a need to issue a shutdown and/or Restart Windows XP inside my application. Any help or example code would be appreciated! -- Phil
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.