473,750 Members | 2,470 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passive Shutdown

ADezii
8,834 Recognized Expert Expert
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 14404
klowell
2 New Member
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 Recognized Expert Expert
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
klowell
2 New Member
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 Recognized Expert Expert
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
2766
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 this would be simple enough if the ASP didn't have any user input, but it does.
2
1847
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 a year ago I wrote an FTP client in C#. It supported only 'Active' mode as that was my requirement at the time; however I now need to support 'Passive' mode. From what I can see, this simply means that you ask the server for the details of the...
0
1906
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 : Shutdown/reboot/logoff. I have tried this : AddHandler Microsoft.Win32.SystemEvents.SessionEnding, AddressOf
3
1189
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
4191
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 send mail code is executed, other necessary Windows Services have been terminated before it can actually send the mail. I've updated my HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services registry DependOnService value including SMPTSVC and...
4
18133
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 as I find appropriate. I am using the socket asynchronously by calling the BeingSend and BeginReceive calls. I would like to be able to call shutdown and close asynchronously if possible.
2
11415
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, OpenProcessToken, LookupPrivilegeValue, AdjustTokenPrivilegese, ExitWindowsEx. I am trying to avoid using any API calls if possible and to use managed code instead. I couldn't find any easy way of doing this but searching the Internet with...
1
2422
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
17413
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
0
9584
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9345
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8265
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6811
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6081
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4716
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3327
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2227
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.