Core function
Release a connection handle.
EDSFreeConnect(HDBC_IV )
•HDBC_IV An input integer value indicating the connection handle.
Description
EDSFreeConnect releases the connection handle you specify and frees all memory associated with that connection handle. Prior to calling EDSFreeConnect, your application must call EDSDisconnect for the connection handle. Otherwise, EDSFreeConnect returns EDS_ERROR and HDBC_IV remains valid. Note that EDSDisconnect automatically drops any HSTMTs open on the connection handle.
Return Values
EDSFreeConnect returns EDS_SUCCESS, EDS_ERROR, or EDS_INVALID_HANDLE.
When EDSFreeConnect 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 EDSFreeConnect.
The following table lists possible SQLSTATE values:
SQL STATE |
Error |
Description |
08S01 |
Communication link failure |
The communication link between the driver and the data source to which the driver was connected failed before the function completed processing. |
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 sequence error |
The function was called prior to calling EDSDisconnect for the connection handle. |
See Also
EDSAllocConnect allocates a statement handle (the opposite of EDSFreeConnect).
EDSConnect and EDSDriverConnect establish a connection to a data source.
EDSDisconnect frees a connection to a data source.
EDSFreeStmt frees a statement handle.
EDSFreeEnv frees the environment handle.