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

Run-time error 3052 file sharing lock count exceeded

Status
Not open for further replies.

emik

MIS
Jul 24, 2006
80
CA
Hi guys,

This is a strange problem I recently encountered. I found a fix for it on Microsoft's website but I want to understand the problem and how it might potentially affect my program.

The error is: "File sharing lock count exceeded. Increase MaxLocksPerFile registry entry."

Essentially I have a file with 150,000 records, my code runs and there are no problems. I got the exact same file for a different time period (only 12,000 records) and in my code when it hits the .edit of a recordset I get the run time error.

So the solution on the Microsoft website is to use the following code:

DAO.DBEngine.SetOption dbmaxlocksperfile, 15000

When I first tried it, it didn't work. I increased the value to 55,000 and it did. So I have no idea how many locks were exceeded by or how many the file has. Have any of you come across this problem before? I'd be very interested to know how you dealt with it and to understand what it actually means.

Thanks

 
You might look at this thread:

thread705-1007896


VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top