Version: 7.0.0

SQLFreeConnect ​

Function ​

Frees a connection handle. It can be replaced by SQLFreeHandle.

Prototype ​

c
SQLRETURN SQLFreeConnect(SQLHDBC     ConnectionHandle);

Parameters ​

Table 1 SQLFreeConnect parameters

Keyword

Parameter Description

ConnectionHandle

Connection handle to be freed.

Return Values ​

  • SQL_SUCCESS: The call is successful.

  • SQL_SUCCESS_WITH_INFO: Some warning information is present.

  • SQL_ERROR: Execution failed, and the connection handle was not released.

  • SQL_INVALID_HANDLE: The input connection handle is invalid.

NOTE ​

If SQLFreeConnect returns SQL_ERROR, the connection handle remains valid. To make the code more robust and easier to maintain, it is recommended to use the standard interface SQLFreeHandle instead of SQLFreeConnect.

Example ​

See: Example