ACC97: Error: "There Isn't Enough Disk Space or Memory"Last reviewed: March 12, 1998Article ID: Q161329 |
The information in this article applies to:
SYMPTOMSIMPORTANT: This article contains information about editing the registry. Before you edit the registry, you should first make a backup copy of the registry files (System.dat and User.dat). Both are hidden files in the Windows folder. Advanced: Requires expert coding, interoperability, and multiuser skills. When you perform an operation on a table, you may receive the following error message if the operation creates a large number of page locks:
There isn't enough disk space or memory.If you run an action query on a large table, you may receive this error message:
There isn't enough disk space or memory to undo the data changes this action query is about to make.Portions of this article assume that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to the "Building Applications with Microsoft Access 97" manual.
CAUSEThe page locks required for the transaction exceed the MaxLocksPerFile value, which defaults to 9500 locks. The MaxLocksPerFile setting is stored in the Windows Registry.
RESOLUTIONThere are several ways to work around this behavior:
Method 1: Changing MaxLocksPerFile in the Windows RegistryWARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows 95. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. For information about how to edit the registry, view the Changing Keys And Values online Help topic in Registry Editor (Regedit.exe). Note that you should make a backup copy of the registry files (System.dat and User.dat) before you edit the registry. Use Registry Editor to increase the MaxLocksPerFile value under the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\Engines\Jet 3.5Note that this method changes the Windows Registry setting for all applications that use the Microsoft Jet database engine version 3.5.
Method 2: Using SetOption to Change MaxLocksPerFile TemporarilyThe SetOption method temporarily overrides values for the Microsoft Jet database engine keys in the Windows Registry. The new value remains in effect until you change it again, or until the DBEngine object is closed. NOTE: Changes made to the MaxLocksPerFile setting using the SetOption method will only be available through the current session of DAO (Data Access Objects). Queries run through the Microsoft Access user interface, will still use the settings within the registry.The following code sample sets MaxLocksPerFile to 200,000 before executing an update operation inside a transaction:
Sub LargeUpdate() On Error GoTo LargeUpdate_Error Dim db As Database, ws As Workspace ' Set MaxLocksPerFile. DBEngine.SetOption dbMaxLocksPerFile, 200000 Set db = CurrentDb Set ws = Workspaces(0) ' Perform the update. ws.BeginTrans db.Execute "UPDATE LargeTable SET Field1 = 'Updated Field'", _ dbFailOnError ws.CommitTrans db.Close MsgBox "Done!" Exit Sub LargeUpdate_Error: MsgBox Err & " " & Error ws.Rollback MsgBox "Operation Failed - Update Canceled" Exit Sub End Sub Method 3: Setting the UseTransaction Property in an Action QueryIf a stored action query causes the error, you can set its UseTransaction property to No. Note that if you do this, you will not able to roll back your changes if there is a problem or an error while the query is executing:
This behavior is by design.
MORE INFORMATIONThe MaxLocksPerFile setting in the Windows Registry prevents transactions in the Microsoft Jet database engine from exceeding a specified value. If a transaction attempts to create locks in excess of the MaxLocksPerFile value, then the transaction is split into two or more parts and partially committed. This feature was added to Microsoft Access 97 to prevent Netware 3.1 server crashes when the specified Netware lock limit was exceeded, and to improve performance with both Netware and Windows NT.
Steps to Reproduce BehaviorThe following example uses a Visual Basic procedure to create a table with 10,000 records in it, and then modifies the table in order to cause the error message:
REFERENCESFor more information about the SetOption method, search the Help Index for "SetOption method." For more information about customizing Windows Registry settings for Microsoft Access 97, search the Help Index for "Registry." For more information about the UseTransaction property, search the Help Index for "UseTransaction property."
|
Additional query words: MaxLocksPerFile Netware
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |