Please enable JavaScript to view this site.

ESL Documentation

High Level subroutine

Disconnect from a data source and free associated handles.

call EDSDeInitEnv(HENV_IV ) 

HENV_IV An input integer value indicating the environment handle

Description

EDSDeInitEnv calls EDSFreeStmt, EDSDisconnect, EDSFreeConnect, and EDSFreeEnv. This command disconnects all connections and frees all statement handles, connection handles, and the environment handle.

Return Values

EDSDeInitEnv returns EDS_SUCCESS, EDS_SUCCESS_WITH_INFO, EDS_INVALID_HANDLE, or EDS_ERROR.

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

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.)

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.
EDSDeInitConnect disconnects from a data source and frees statement and connection handles.
EDSDriverConnect connects to a data source.
EDSFreeConnect frees a connection handle.
EDSFreeEnv frees an environment handle.
EDSFreeStmt frees a statement handle.
EDSInit connects to a data source and returns environment, connection, and statement handles.