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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unlocking a database

Status
Not open for further replies.

JeroenNL

Programmer
Nov 28, 2002
217
0
0
NL
Hi there,

Every morning I automatically run a few macros (which run queries) in an Access 2003 database. I do this using the Task Scheduler from Windows. The task is run by a system useraccount (I can't use that account, I have to go to the system administrators to get things changed if needed).

Now here's the problem: every now and then one of the queries goes wrong. The database simply hangs and stays open (.ldb file is there and can't be removed). So this locks my database. Because the queries were run by that system useraccount, I can't get into the Access database anymore and I have to go to the system administrators to get things fixed. Is there any way to bypass that systemuser and get into the database afterall, so I can close it normally?

Bye,
Jeroen

A 3D editor project
 
You need to look at the errors you are getting and write error handling code for these (and any general error) situations. Maybe email yourself if an error occurs.

That way the macro will not cause a fatal error in this way.
 
Error handling code won't help in every situation. For example, suppose I have made a few queries based on some table. Now the layout of that table (field definitions) change and I am not notified of this. I thus assume that my query is OK but it will in fact hang up on me because it expects certain fields to be in there. I can't use error handling code in that situation and my database is locked because the system useraccount was the last to use it. So the question remains: how can I get into the database without using the system useraccount?

Bye,
Jeroen

A 3D editor project
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top