Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.24 KB

File metadata and controls

28 lines (22 loc) · 1.24 KB
title SQLFreeStmt
description SQLFreeStmt
author markingmyname
ms.author maghan
ms.reviewer randolphwest
ms.date 10/20/2025
ms.service sql
ms.subservice native-client
ms.topic reference
helpviewer_keywords
SQLFreeStmt function
apitype DLLExport

SQLFreeStmt

[!INCLUDE SQL Server Azure SQL Database Synapse Analytics PDW]

Generally, SQLFreeStmt isn't recommended in ODBC 3.0 and later. However if the application needs to reuse the statement you should still use SQLFreeStmt (with the SQL_RESET_PARAMS and SQL_UNBIND options).

You might also use SQLCloseCursor, SQLBindParameter, SQLBindCol, SQLSetDescField, and SQLFreeHandle to replace or duplicate the function of SQLFreeStmt and should use them instead.

In general, it's more efficient to reuse statements than to drop them and allocate new ones. However in some situations, like the reusing of statements, SQLFreeStmt still must be used.

Related content