Version: 7.0.0

SQLFreeEnv ​

Function ​

Frees an environment handle. It can be replaced by SQLFreeHandle.

Prototype ​

c
SQLRETURN SQLFreeEnv(SQLHENV     EnvironmentHandle);

Parameters ​

Table 1 SQLFreeEnv parameters

Keyword

Parameter Description

EnvironmentHandle

Environment 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 environment handle was not freed.

  • SQL_INVALID_HANDLE: The input environment handle is invalid.

NOTE ​

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

Example ​

See: Example