Article ID: 815281 - View products that this article applies to.
When one or more users process many transactions in a multi-user environment, the transactions may fail with the following error message:
File sharing lock count exceeded. Increase MaxLocksPerFile registry entry.
The error occurs if the number of locks required to perform a transaction exceeds the maximum number of locks per file.
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/322756/ )How to back up and restore the registry in Windows
To work around this problem, increase the maximum number of locks per file. To do this, use one of the following methods.
Method 1: Set the registry key to MaxLocksPerFile to increase the maximum number of locks per file
Method 2: Use the SetOption method to temporarily change MaxLocksPerFileNote The sample code in this article uses Microsoft Data Access Objects. For this code to run correctly, you must reference the Microsoft DAO 3.6 Object Library. To do so, click References on the Tools menu in the Visual Basic Editor, and make sure that the Microsoft DAO 3.6 Object Library check box is selected.
The SetOption method temporarily overrides the default number of locks per file. You set the default number of locks per file when you set the MaxLocksPerFile registry key. You set the new value by using the SetOption method. The new value is valid until you close the DBEngine object. To use Method 2, follow these steps:
Changes you make to the MaxLocksPerFile setting by using the SetOption method are available only for the current session.
The MaxLocksPerFile setting determines the maximum number of locks Microsoft Jet places against a file. The default MaxLocksPerFile value is 9,500. However, do not change this value if you are working on a Novell NetWare server, because the maximum server record locks per connection is 10,000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/305995/ )Error "3050 Could Not Lock File" when you connect to a Jet database on a Novell server
For more information, visit the following Microsoft Knowledge Base articles:
(http://support.microsoft.com/kb/198633/ )You receive an "File sharing lock count exceeded" error message when you synchronize two replicas in Access 2000
(http://support.microsoft.com/kb/209940/ )"There isn't enough disk space or memory" error message when you perform an operation on a table in Access 2000
Article ID: 815281 - Last Review: December 12, 2007 - Revision: 8.3
Contact us for more help