Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database locking up

Status
Not open for further replies.

Corsica

IS-IT--Management
Nov 30, 2004
30
GB
When a VB module is run, from the editor or via an event procedure, I sometimes get the following error message:

"The database has been placed in a state by an unknown user that prevents it from being opened or locked."

-I've found that to unlock the database I must then close the database file. [Sometimes 'saving' and/or 'reseting' does the trick.]

I have had this error message come up numerous times when I have been working on my home computer, which is not part of a network.

Thanks in advance to anyone who would take the time to reply with any information that he/she thinks might be helpful.

CSC
 
I too have received this error and have resorted to close/save you mention to get going again. Since I'm the only one using the database that I have open, I have narrowed down the suspects, but not the cause.
 
Hi dc20,

Thanks for your reply! I'd be very keen to know how you get on with finding the cause of this annoying problem.

CSC
 
You might by unknowingly trying to open another Instance of Access in your code.

If any part of your code is setting a reference to your DB and not closing it correctly when you run that code again you will get that error. That is why once you close everything it starts to work again.

Make should you have only one Instance of access running in your task list.
 
Thanks nice95gle for your reply. I do have code at the end of each of my modules which closes the database object, but I'll take a look at the task manager next time it happens...

CSC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top