PRB: SQLCancel Instead of SQLFreeStmt Causes a Memory LeakLast reviewed: December 17, 1996Article ID: Q159571 |
The information in this article applies to:
SYMPTOMSIf an ODBC application uses SQLCancel instead of SQLFreeStmt to close an ODBC cursor after some data has been processed, the ODBC cursor library version 2.5 may generate a memory leak. A Visual Basic 4.0 application may encounter this problem if the application uses the Requery method of an RDO Resultset. The ReQuery method internally invokes SQLCancel instead of SQLFreeStmt and SQL_CLOSE to close the statement handle, before binding the parameters and results.
CAUSEAn ODBC application should only call SQLCancel when dealing with asynchronous processing. ODBC applications should always use SQLFreeStmt and SQL_CLOSE rather than SQLCancel to close the statement handle. For more information on how to use SQLCancel, please refer to Microsoft ODBC 2.0 Programmer's Reference and SDK Guide.
MORE INFORMATIONA Visual Basic application can call the Close and OpenRecordset methods instead of ReQuery. The Close method invokes SQLFreeStmt and SQL_CLOSE to close the statement handle.
|
KBCategory: kbusage kbother
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |