Hello,
I'm recieving the following run-time error:
Database has been placed in a start by user 'Admin" on machine 'Machine' that prevents it from being opened or locked.
This is the code that I get the error on
MyDB = "H:\DataManagement.mdb"
strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & MyDB
cnn1.Open strCnn
and the error is on cnn.1.Open.strCnn
Does anyone know what I might be doing wrong?
9 12268
@ ejamnadas
Just out of curiosity. Is DataManagement.mdb the same database where the code resides?
Thanks for the replies. Chip, I checked the default access mode, it is set to shared. Also, I have dont have adobe acrobat installed (only reader).
FishVal,
Yes, this is the same database the code resides.
Here is some more information i'm not sure is helpful or not. This is the err.description error I recieve when I first open the database:
"The item cannot be found in the collection corresponding to the requested name or ordinal". After that, I recieved the "Database has been placed in a state by user" error.
Now after I close the database and reopen:
I only recieved "The item cannot be found..." error. But when I remove "On Error..." code, or unless swich to design mode, and then switch back to to view mode, at which point I recieved the "database has been placed in a state.." run-time error.
-ejamnadas
So, it is you the user that "has placed databasein a state ... ". :)
Database goes in locked state when there is an unsaved object in it. In your case it is code module where you write your code.
BTW, there is no need to open connection as soon as there is already opened one. Even two. - ADO connection accessible via CurrentProject.Connection property.
- DAO connection accessible via Currentdb.Connection property.
There is really no reason to open an additional connection.
As for the 2nd error - there is no place in the code you've where it could happen.
Regards,
Fish
I tried using the CurrentProject.Connection property to get a list of the workstations connected to the backend with
Set records = CurrentProject.Connection.OpenSchema(adSchemaProvi derSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
but it only returned one record. Is there any way to get to all the connected users without making another connection?
Hello, ChipR.
I've not tested it myself.
But code posted here definitely doesn't create new ADO connection.
I more than sure that the author has provided a well tested code snippet. :)
I just realized, it does make sense that CurrentProject.Connection is showing me only 1 user connected because it's the connection to the front end I'm running, rather than to the back end. Do you happen to know if it's possible to access the connection that linked tables are currently using if I have a form that keeps a connection open?
I guess it is DAO connection which doesn't support OpenSchema method.
Fishval, Thank you for the help.
The currentdb.execute command did work.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: L Mehl |
last post by:
I tested a FE/BE application developed in A2000 on a A2002 machine and got
this message when exiting the app. Clicking the only available button "OK",
exits the application, as intended.
The FE...
|
by: Orchid |
last post by:
Hello,
I have a MS. Access database in XP. When I open the database in design
view, users will get an error message & cannot even open the database.
Is there any way to solve this problem?
...
|
by: Rey |
last post by:
Howdy all.
Was wondering if there is any resolution for err 3734:
"The database has been placed in a state by user X on machine Y that
prevents it from being opened or locked."
I've spent...
|
by: ozgur develioglu |
last post by:
hi everyone,
I've a USER table which contains USERNAME column. I try to keep
usernames unique. When I'm adding I new user, I frist go to database and
check if that username already exists and if...
|
by: hfk0 |
last post by:
Hi,
I'm new to ASP.net, SQL Server and visual studio.net, and I'm having
problem inserting and storing data from a web form to a SQL database.
I created a simple ASP.NET web form, a simple SQL...
|
by: tricard |
last post by:
Good afternoon all,
I have recently been trying my hand out at the ADO model as before I
have only used DAO (just thought I would expand my knowledge a bit).
The problem I am having is that...
|
by: teenagelcruise |
last post by:
hi,
i have a problem with my code which is i cannot update and addnew data into the database but i can delete the data.plz give me an idea.this is my code that i wrote.
<html>
<head>
<meta...
|
by: rm |
last post by:
When using ADO in a module inside an Access 2003 database do I need to
open a db connection even though I am working with a table inside the
same database?
I am writing a bit of code to...
|
by: Briansmi1116 |
last post by:
I have a database that I created to be used by several people on a network. Every now and then, when someone has it open, and another wants to open it they get this error; "The database has been...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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,...
|
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...
| |