Please enable JavaScript to view this site.

ESL Documentation

Level 1 function

Return the current setting of a connection option.

EDSGetConnectOption(HDBC_IV, OPTION_IV, VALUE_SV |VALUE_IV ) 

HDBC_IV An input integer value indicating the connection handle.

OPTION_IV An integer input value indicating the connection option to retrieve.

VALUE_SV | VALUE_IV An output reference value associated with OPTION_IV. If OPTION_IV specifies an option that returns a string, specify VALUE_SV. Otherwise, use VALUE_IV.

Description

Depending on the option, your application does not need to establish a connection prior to calling EDSGetConnectOption. However, if EDSGetConnectOption is called and the specified option does not have a default and has not been set by a prior call to EDSSetConnectOption, EDSGetConnectOption will return EDS_NO_DATA_FOUND. For a list of options, refer to EDSSetConnectOption.

While your application can set statement options using EDSSetConnectOption, it cannot use EDSGetConnectOption to retrieve statement option values; it must call EDSGetStmtOption to retrieve the setting of statement options.

EDSGetConnectOption returns an integer value representing a 32-bit bitmask. To determine which options are supported, use EDSQueryBitmask (VALUE_IV|VALUE_SV,BITFLAG).

Return Values

EDSGetConnectOption returns EDS_SUCCESS, EDS_NO_DATA_FOUND, EDS_INVALID_HANDLE, or EDS_ERROR.

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

The following table lists possible SQLSTATE values:

SQL

STATE

Error

Description

08003

Connection not open

An OPTION_IV value was specified that required an open connection.

IM001

Driver does not support this function

The driver corresponding to the connection 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 was called for an statement handle associated with the connection handle and was still executing when EDSGetConnectOption was called.

S1092

Option type out of range

An invalid OPTION_IV value was specified.

S1C00

Driver not capable

The driver or data source does not support the specified OPTION_IV.

See Also

EDSGetStmtOption retrieves options associated with a statement handle.

EDSSetConnectOption and EDSSetStmtOption set connection or statement options associated with a connection handle.