The information in this article applies to:
SYMPTOMSA memory leak can occur in applications that use the Microsoft Jet database engine to access remote Open Database Connectivity (ODBC) data sources. You can look in the Windows NT Performance Monitor while the program runs and see a steady decrease in available memory if the problem is present. If this continues long enough, you might see "Out of Virtual Memory" or other low memory errors. If you examine an ODBC trace log, you can see that ODBC hstmt statement handles are allocated, but never freed. CAUSE
When Jet executes Structured Query Language (SQL) commands on a remote
table, it creates a new hstmt to execute the command. However, in some
instances, it never frees the hstmt. Over time, this can result in
decreased performance and low memory errors. Many applications never
experience the memory leak because it occurs only when a remote table is
being updated (the SQL UPDATE statement). The leak associated with hstmt's
does not occur when you execute SELECT, INSERT, or DELETE statements. And,
even when UPDATE statements are being executed, it can require thousands of
iterations before the problem becomes evident.
RESOLUTION
To work around this problem, you can periodically close the connection to
the remote data source. When the connection is closed, ODBC releases all
resources, such as hstmt's, that are associated with the connection. This
frees the hstmt's and associated memory allocations.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. Additional query words: kbDatabase kbJet351 kbODBC kbVC500bug kbDSupport kbDSE
Keywords : |
Last Reviewed: July 19, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |