Memory Use Climbs with Multiple Recordsets Under a Single Jet Session/Connection

ID: Q247140


The information in this article applies to:
  • Microsoft ODBC Driver for Access, version 4.0
  • Microsoft OLE DB Provider for Jet, version 4.0


SYMPTOMS

When you open and close multiple ODBC statements (HSTMTs) under a single ODBC connection (HDBC) when using the Microsoft ODBC Driver for Access (MDAC version 2.1), memory use climbs until the parent HDBC is closed. Also, when opening and closing multiple rowsets under a single session when using Microsoft OLE DB Provider for Jet, version 4.0, memory use climbs until the parent session is released. The memory use issue can be reproduced by using ActiveX Data Objects (ADO), Open Database Connectivity (ODBC), or OLE DB APIs as the client API.


CAUSE

Microsoft Jet 4.0 is not releasing cached resources until the parent database connection is closed. Note that this is not a memory leak; rather, this is a resource allocation that is never freed until the parent object is closed.


RESOLUTION

A supported fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information on support costs, please go to the following address on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp
The English version of this fix should have the following file attributes or later:

File name        Date        Size      Version       
----------------------------------------------------- 
Expsrv.dll       6/24/99     379,152   6. 0.8540
Msjet40.dll     11/15/99   1,499,408   4.00.3515.0   
Msjtes40.dll    11/15/99     237,840   4.00.3515.0   
Msjter40.dll     6/2/99      53,520    4.00.2927.2   
Mswdat10.dll    11/15/99     831,760   4.00.3515.0   
Mswstr10.dll    11/15/99     614,672   4.00.3515.0   
Vbajet32.dll     1/21/99      30,992   6. 1.8268      
 


WORKAROUND

One workaround is to periodically close and then re-open the parent connection to release the memory used.

Another workaround is to apply the hotfix described in this Microsoft Knowledge Base article.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

In general, this issue occurs when you open and close multiple recordsets under a single database connection in conjunction with manipulating each recordset in some fashion. For example, if you add or delete some records from each recordset that is opened and closed, the leak may occur. The issue can also occur if you use a parameterized SQL statement. If you just open each recordset and read some records for example, the leak does not occur. The leak is small so you must monitor the private bytes used by the process for a long time to determine whether or not the leak applies to a specific case.

Additional query words:

Keywords : kbADO kbDatabase kbJET kbMDAC kbODBC kbOLEDB kbGrpVCDB kbGrpMDAC kbDSupport kbMDAC210SP2fix
Version : WINDOWS:4.0
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 21, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.