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
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