The information in this article applies to Microsoft Access 97.
This is an advanced article that requires expert coding, interoperability, and multiuser skills. 


When you run a query, you might receive the following error message when memory is still available: 
2004 'Out of Memory.'
You might also receive this error message: 
Query too complex.


You have a newer version of the Microsoft Jet database engine than the one originally installed by your Microsoft product. When you use Microsoft Data Access Objects (DAO) code to get data from a Jet database, you might see this problem if you are doing the following:
  • Using code to loop through a recordset based on a linked table.
  • Working with a QueryDef 
The error has been reported to occur in the following languages: Visual Basic and Visual C++ (using MFC), and with the DAO Software Development Kit. This problem is related to the Jet database engine itself, not to DAO. 


NOTE: Before going through the resolution steps, verify that you have not actually run out of memory and that your Temp folder (directory) is set to a valid folder and is not full. If, after you have verified memory and the status of the Temp folder and you still experience the problem, continue to the resolution steps.
To resolve this problem, do one of the following: 
  1. Obtain and install the Microsoft Office 97 Service Release (SR) 2. For more information about getting this Service Release, see the following article in the Microsoft Knowledge Base:

    Q151261 OFF97: How to Obtain and Install MS Office 97 SR-2

  2. Obtain Jet35sp3.exe from the Microsoft Web site. This file contains the updated version 3.51 of the Microsoft Jet database engine. For information on how to obtain Microsoft Jet 3.51, please see the following article in the Microsoft Knowledge Base:

    Q172733 ACC97: Updated Version of Microsoft Jet 3.5 Available for Download 


Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem no longer occurs in Microsoft Access 97 SR-2. 


The following is a list of the Jet DLL versions and whether they show the problem: 
3.50.3428.0 Shipped with Access 97 Does not reproduce the problem.
3.50.3602.4 Shipped with Visual Basic 5.0 Does not reproduce the problem.
3.50.3907.5 Shipped with US Access SR-1 Does exhibit the problem.
3.51.0623.4 Updated version of Microsoft Jet database engine 3.5 formerly available for download Does exhibit the problem.
3.51.2010.0 Available as part of Office 97 SR-2 Does not reproduce the problem.
3.51.2026.0 Available as part of Microsoft Data Access Components 2.0 SP2 Does not reproduce the problem.
3.51.3328.0 Updated version of Microsoft Jet Database Engine 3.5 available in Download Center Does not reproduce the problem.
For further information about the different versions of the Jet database engine, please refer to the following article in the Microsoft Knowledge Base: 
Q178880 INFO: Identifying the Jet Database Engine Components

Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: December 10, 2016