Please enable JavaScript to view this site.

ESL Documentation

High Level subroutine

Disconnect and free a connection and its statement handles.

call EDSDeInitConnect(HDBC_IV ) 

HDBC_IV An input integer value indicating the connection handle.

Description

EDSDeInitConnect calls EDSFreeStmt, EDSDisconnect, and EDSFreeConnect. This command frees all statements open on the connection handle and then disconnects and frees the connection itself.

Return Values

EDSDeInitConnect returns EDS_SUCCESS, EDS_SUCCESS_WITH_INFO, EDS_INVALID_HANDLE, or EDS_ERROR.

When EDSDeInitConnect 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 EDSDeInitConnect.

The following table lists possible SQLSTATE values.

 

SQL

STATE

Error

Description

01002

Disconnect error

An error occurred during the disconnect. However, the disconnect succeeded. (Function returns EDS_SUCCESS_WITH_INFO.)

08003

Connection not open

The connection specified in the argument HDBC_IV was not open.

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.

25000

Invalid transaction state

There was a transaction in process on the connection specified by the argument HDBC_IV. The transaction remains active.

IM001

Driver does not support this function

The driver associated with the statement handle does not support the function.

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.

S1001

Memory allocation failure

The driver was unable to allocate the memory required to support execution or completion of the function.

S1010

Function sequence error

An asynchronously executing function (not this one) was called for the statement handle and was still executing when this function was called.

See Also

EDSAllocConnect allocates a connection handle.
EDSAllocEnv allocates an environment handle.
EDSAllocStmt allocates a statement handle.
EDSConnect activates a connection.
EDSDisconnect disconnects from a data source.
EDSDeInitEnv disconnects from a data source and frees statement, connection, and environment handles.
EDSDriverConnect connects to a data source.
EDSFreeConnect frees a connection handle.
EDSFreeEnv frees an environment handle.
EDSFreeStmt frees the statement handle.
EDSInit connects to a data source and returns environment, connection, and statement handles.