Article ID: 319998 - Last Review: February 12, 2007 - Revision: 3.3 BUG: Memory leak occurs when you query an open Excel worksheet by using ActiveX Data Objects (ADO)This article was previously published under Q319998 On This PageSYMPTOMS When you retrieve a Microsoft ActiveX Data Objects (ADO)
Recordset from an Excel worksheet that is open in Excel, a memory leak occurs
in the Excel process. Repeated queries may eventually cause Excel to run out of
memory and raise an error, or cause Excel to stop responding. RESOLUTION The memory used by the ADO queries cannot be reclaimed by
closing and releasing the ADO objects. The only way to release the memory is to
quit Excel. If possible, query the Excel worksheet only while the file is not open in Excel. If the worksheet must remain open (for example, to allow dynamic recalculation of worksheet values on an ongoing basis) use one of the following methods to work around the behavior: Method 1
Method 2
STATUSMicrosoft has
confirmed that this is a bug in the Microsoft products that are listed at the
beginning of this article.
MORE INFORMATIONSteps to Reproduce the Behavior
REFERENCES
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
257819
(http://support.microsoft.com/kb/257819/
)
How To Use ADO with Excel Data from Visual Basic or VBA
For additional information
about the use of performance counters from Visual Basic, click the following article number to view the article in the Microsoft Knowledge Base:
296526
(http://support.microsoft.com/kb/296526/
)
INFO: Collecting Performance Data Using PDH APIs from Visual Basic
For additional
information about Excel export options, click the article numbers below to view
the articles in the Microsoft Knowledge Base: 247412
(http://support.microsoft.com/kb/247412/EN-US/
)
INFO: Methods for Transferring Data to Excel from Visual Basic
246335
(http://support.microsoft.com/kb/246335/
)
How To Transfer Data from an ADO Recordset to Excel with Automation
| Article Translations
|

Back to the top
