Which recordsets open

macca the hacke

Macca the Hacca
Local time
Today, 00:47
Joined
Dec 1, 2005
Messages
221
Hi

I have an issue with my database since I split it into 2.
Once I have opened my main form whenever I try and change existing queries, forms etc I get the warning - you do not have exclusive access to the database at this time. If you proceed to make changes, you may not be able to save them later.
I know other users are not in the database, so must be some of my code that opens recordsets to look for data. I have referenced all of them to the back end (opendatabase(backend)) rather than currentdb(). I am sure that all of them set db back to nothing once they have finished, so cannot think what is locking the database.
Is there any way of getting access to list all open recordsets, so I can find out what is happenning?

Ta
 
Did you try to open your mdb as EXCLUSIVE OPEN ??
 
Hi

Thats solves the issue, although I cannot use this as the solution as more than 1 person needs to access the database at once.

Rob
 
If you want more users to work at once,
put "SHARED" IN "Default open mode",
(Tools, Options, Advanced), check "Default
record locking" too.
 
Thanks MStef
That was what I had in there originally! The issue is not whether the database is shared or exclusive. The issue is that the database thinks it is open more than once because there are recordsets being opened (and not closed) in the background. I need to find out which one is staying open and tricking the database into thinking it is open more than once
 
Try next:
Go in the directory where yor mdb is, (Windows explorer).
Find .ldb file, (the same name as your mdb, 1KB), delete it and try.
 
Thanks.
I know how to get the database back into thinking there is only 1 person in it - that is not a problem.
My problem is stopping the issue arising in the first place!
 

Users who are viewing this thread

Back
Top Bottom