- You install SQL Server Native Client 10.5 on a computer.
- You run an application that uses the SQL Server Native Client ODBC driver to connect to an instance of SQL Server.
- A prepared statement is executed in the application multiple times.
Note When the statement is executed, the sp_prepare and the sp_prepexec stored procedures are used.
- You use the SQLFreeStmt ODBC API function to release the handles of the prepared statements.
In this scenario, a memory leak may occur in the instance of SQL Server.
The SQLCloseCursor, SQLBindParameter, SQLBindCol, SQLSetDescField, and SQLFreeHandle ODBC API functions replace or duplicate the function of SQLFreeStmt. Therefore, we recommend that you use these functions instead of the SQLFreeStmt function.
For more information, visit the following Microsoft websites:
Article ID: 2422010 - Last Review: Dec 22, 2010 - Revision: 1