Error opening database

irade92

Registered User.
Local time
Tomorrow, 00:27
Joined
Dec 26, 2010
Messages
229
n a module of setting Recordsets code stop at this line
Set db = OpenDatabase("c:\op\mat.accdb") giving me this error:

"The database has been placed in a state by user 'Admin' on machine 'RADE-PC' that prevents it from being opened or locked"
What should I do to solve this..
Thanks
 
Have you tried rebooting the machine?
Have you checked for locking files?
Have you done anything?
 
Have you tried rebooting the machine?
Have you checked for locking files?
Have you done anything?

Thanks Drake
But I expect answers not questions..these message appears for three days..Where to look for locking files?
 
To get to an answer you first have to ask a question or questions to decide which path to go down. I could have offered several solutions all of which would have been redundant as you have already been down that route. So by asking the preliminary questions lets me know that yu have tried the obvious.

As far as the locking files they should appear in the current project path.

These remain mainly due to the fact that a person has exited the db in an unconvetional way, but Oh, I forgot, you already knew that.
 
To get to an answer you first have to ask a question or questions to decide which path to go down. I could have offered several solutions all of which would have been redundant as you have already been down that route. So by asking the preliminary questions lets me know that yu have tried the obvious.

As far as the locking files they should appear in the current project path.

These remain mainly due to the fact that a person has exited the db in an unconvetional way, but Oh, I forgot, you already knew that.

Thanks DCrake
I think you are right and gave me an idea..where can be my problem...I use MoveNext method when EOF proeprty was True and got an error...and executing this procedure once more time I got this message..
Thanks again
But how to avoid in a Do While Not rs.EOF...MoveNext ..Loop to go beyond last records...I expect it to go out of Loop automaticaly.
 
Look for the RADE-PC computer, use Task Manager to End all Access Processes, open and close the database. That should unlock the file.

The database has to be opened in exclusive mode for that code to work, meaning no one should have it open before the code is run.
 

Users who are viewing this thread

Back
Top Bottom