ACC2000: Error: "There Isn't Enough Disk Space or Memory"ID: Q209940
|
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:
If you run an action query on a large table, you may receive the following error message:There isn't enough disk space or memory.
There isn't enough disk space or memory to undo the data changes this action query is about to make.
The page locks required for the transaction exceed the MaxLocksPerFile value, which defaults to 9500 locks. The MaxLocksPerFile setting is stored in the Windows Registry.
There are several ways to work around this behavior:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Jet 4.0
Note that this method changes the Windows Registry setting for all
applications that use the Microsoft Jet database engine version 4.0.
http://www.microsoft.com/mcsp/For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/overview/overview.aspThe 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.
Sub LargeUpdate()
On Error GoTo LargeUpdate_Error
Dim db As DAO.Database, ws As DAO.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
The MaxLocksPerFile setting in the Windows Registry prevents transactions in the Microsoft Jet database engine from exceeding a specified value. If a transaction tries to create locks in excess of the MaxLocksPerFile value, 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 Microsoft Windows NT.
Sub CreateBigTable()
Dim db As Database, rs As Recordset
Dim iCounter As Integer, strChar As String
Set db = CurrentDb
db.Execute "CREATE TABLE BigTable (ID LONG, Field1 TEXT(255), " & _
"Field2 TEXT(255), Field3 TEXT(255), Field4 TEXT(255))", _
dbFailOnError
Set rs = db.OpenRecordset("BigTable", dbOpenDynaset)
iCounter = 0
strChar = String(255, " ")
While iCounter <= 10000
rs.AddNew
rs!ID = iCounter
rs!Field1 = strChar
rs!Field2 = strChar
rs!Field3 = strChar
rs!Field4 = strChar
rs.Update
iCounter = iCounter + 1
Wend
MsgBox "Done!"
End Sub
CreateBigTable
Microsoft Access can't change the data type.
There isn't enough disk space or memory.
Errors were encountered during the save operation. Data types were not changed. Properties were not updated.
For more information about the SetOption method, in the Visual Basic Editor, click
Microsoft Visual Basic Help on the Help menu, type "SetOption method" in
the Office Assistant or the Answer Wizard, and then click Search to
view the topic.
For more information about customizing registry settings for the Jet database engine, click Microsoft Access Help on the
Help menu, type "Customizing Windows Registry settings for Microsoft Jet" in the Office Assistant or the Answer Wizard,
and then click Search to view the topic.
For more information about the UseTransaction property, click Microsoft Access Help on the
Help menu, type "UseTransaction property" in the Office Assistant or the Answer Wizard,
and then click Search to view the topic.
Additional query words: prb MaxLocksPerFile Netware
Keywords : kberrmsg kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: July 6, 1999