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

Could Not Lock File

Status
Not open for further replies.

dwlerwill

Technical User
May 25, 2001
329
Hi All

I know this problem has probably been addressed numerious times but I can not find a solution.

I have a database with about 50 users (there is a VB front end and a access 97 data store)

I am constantly getting "Could not lock file" error messages. I have downloaded a LDB viewer but it just says it can not access the ldb file. If i look at the ldb file in word pad it says the file can not be found.

So I have 2 questions

1> Is there any way to read a ldb file once the database becomes locked.

2> How can I unlock the database to allow other users to use it?

Cheers

David Lerwill
"If at first you don't succeed go to the pub"
 
Just a hunch... Make sure all users of the application have the ability to create and modify the LDB file. Remember it gets destroyed everyime the last use gets out of the database. This means the folder permissions. It also means that any compacting will cause the MDB to inherit the folder permissions because it is technically a create and a delete. This just seems similar to a issue I used to have using Access as the front end.
 
It is usually good practice when using a frontend/backend setup in Access to have the frontend create a lock on the backend during the startup routine. This means that clients are not having to get a lock every time they want to access data in the backend tables - this can be problematic in an environment with a relatively large number of concurrent users (for Access).

An easy way to do this is to open a global recordset based on a table in the backend during the frontend's startup routine and maintain this recordset for the lifetime of the instance of the application. If you use a small table (it doesn't even need to have any records) then you will minimise any performance-related issues associated with this.

Ed Metcalfe.

Please do not feed the trolls.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top