Core function
Free the environment handle.
EDSFreeEnv(HENV_IV )
•HENV_IV An input integer value indicating the environment handle.
Description
Prior to calling EDSFreeEnv, your application must call EDSFreeConnect for all connection handles opened under the environment handle. Otherwise, EDSFreeEnv returns EDS_ERROR, and HENV_IV and any active connection handle remains valid.
Return Values
EDSFreeEnv returns EDS_SUCCESS, EDS_ERROR, or EDS_INVALID_HANDLE.
When EDSFreeEnv returns EDS_ERROR, you can obtain an associated SQLSTATE value with more specific information by calling EDSError. The following table lists each typical SQLSTATE value and explains each one in the context of the command EDSFreeEnv.
The following table lists possible SQLSTATE values:
SQL STATE |
Error |
Description |
S1000 |
General error |
An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by EDSError in the argument ERRORTEXT describes the error and its cause. |
S1010 |
Function |
There was at least one connection handle in an sequence error allocated or connected state. Call EDSDisconnect and EDSFreeConnect for each connection handle before calling EDSFreeEnv. |
See Also
EDSAllocEnv allocates an environment handle (the opposite of EDSFreeEnv).
EDSFreeConnect frees a connection handle.