Please enable JavaScript to view this site.

ESL Documentation

Level 1 function

Return information about the driver and data source.

EDSGetInfo(HDBC_IV, INFOTYPE_IV, INFOVALUE_IV |INFOVALUE_SV) 

HDBC_IV An input integer value indicating the connection handle.

INFOTYPE_IV An input integer value that indicates the type of information. INFOTYPE_IV must be a value indicating the appropriate data type (see the Description, below).

INFOVALUE_IV | INFOVALUE_SV An output reference value. Depending on the INFOTYPE_IV value requested, the information returned will be a string or integer value. (Refer to "Description," for the appropriate type.)

Description

EDSGetInfo returns general information about the database driver and the data source associated with the specified connection handle.

The values for INFOTYPE_IV correspond to values in the following table. Type numbers from 1-999 are reserved by ODBC; type numbers from 1,000 to 64,000 can be reserved for use by specific drivers.

The format of the information returned in the INFOVALUE parameter depends on the INFOTYPE_IV request, but will be either a string or integer value. For example, if INFOTYPE_IV is EDS_DRIVER_NAME, you must supply a string value for INFOVALUE_SV.

The following values for INFOTYPE_IV return information about the ODBC driver. Information such as active statements, data source name, and ODBC conformance is returned as described in the following table.

INFOTYPE_IV

Returns

EDS_ACTIVE_CONNECTIONS

An integer value specifying the maximum number of active HDBCs that the driver can support. This value can reflect a limitation imposed by either the driver or the data source. If there is no specified limit or the limit is unknown, this value is set to zero.

EDS_ACTIVE_STATEMENTS

An integer value specifying the maximum number of active HSTMTs that the driver can support for a connection handle. This value can reflect a limitation imposed by either the driver or the data source. If there is no specified limit or the limit is unknown, this value is set to zero.

EDS_DATA_SOURCE_NAME

A character string with the data source name used during EDSConnect, EDSDriverConnect, and EDSBrowseConnect.

EDS_DRIVER_HENV EDS_DRIVER_HDBC

An integer value, the driver’s environment handle or the connection handle, as determined by the argument HDBC_IV. These information types are implemented by the Driver Manager alone.

EDS_DRIVER_HSTMT

An integer value, the driver’s statement handle determined by the Driver Manager statement handle, which must be passed on input in INFOVALUE_IV from your application. Note that in this case, INFOVALUE_IV is both an input and an output argument. The input statement handle passed in INFOVALUE_IV must have been a statement handle allocated on the argument HDBC_IV. This information type is implemented by the Driver Manager alone.

EDS_DRIVER_NAME

A character string with the filename of the driver used to access the data source.

EDS_DRIVER_VER

A character string with the version of the driver and, optionally, a description of the driver. At a minimum, the version is of the form ##.##.####, where the first two digits are the major version, the next two digits are the minor version, and the last four digits are the release version.

EDS_FETCH_DIRECTION

An integer value representing a 32-bit bitmask that enumerates the supported fetch direction options. The following values are used to determine which options are supported:

EDS_FD_FETCH_NEXT

EDS_FD_FETCH_FIRST

EDS_FD_FETCH_LAST

EDS_FD_FETCH_PREV

EDS_FD_FETCH_ABSOLUTE

EDS_FD_FETCH_RELATIVE

EDS_FD_FETCH_RESUME

 

The integer value returned represents a 32-bit bitmask. To determine which options are included, use EDSQueryBitmask.

EDS_ODBC_API_CONFORMANCE

An integer value indicating the level of ODBC Conformance: 0 = None 1 = Level 1 supported 2 = Level 2 supported

EDS_ODBC_SAG_CLI_CONFORMANCE

An integer value indicating compliance to the functions of the SAG specification: 0 = Not SAG-compliant; one or more core functions are not supported 1 = SAG-compliant

EDS_ODBC_SQL_CONFORMANCE

An integer value indicating SQL grammar supported by the driver: 0 = Minimum grammar supported 1 = Core grammar supported 2 = Extended grammar supported

EDS_ODBC_SQL_OPT_IEF

A character string. “Y” if the data source supports the optional Integrity Enhancement Facility, “N” if it does not.

EDS_ODBC_VER

A character string with the version of ODBC to which the Driver Manager conforms. The version is of the form ##.##.####, where the first two digits are the major version, the next two digits are the minor version, and the last four digits are the release version.

EDS_PROCEDURES

A character string. “Y” if the data source supports procedures and the driver supports the ODBC procedure invocation syntax; “N” otherwise.

EDS_ROW_UPDATES

A character string. “Y” if the driver can detect changes in rows between multiple fetches of the same rows; otherwise, “N”.

EDS_SEARCH_PATTERN _ESCAPE

A character string specifying what the driver supports as an escape character to permit the use of the pattern match meta characters underscore (_) and percent (%) as valid characters in search patterns. This escape character applies only for those catalog function arguments that support search strings. This use of INFOTYPE_IV is limited to catalog functions. For a description of the use of the escape character in search pattern strings, see Catalog Commands.

EDS_SERVER_NAME

A character string with the actual data source– specific server name; useful when a data source name is used during EDSConnect, EDSDriverConnect, and EDSBrowseConnect.

The following values for INFOTYPE_IV return information about the DBMS product. Information such as database name and version is returned in the format specified below.

INFOTYPE_IV

Returns

EDS_DATABASE_NAME

A character string with the name of the current database in use, if the data source defines a named object called “database”.

EDS_DBMS_NAME

A character string with the name of the DBMS product accessed by the driver.

EDS_DBMS_VER

A character string indicating the version of the DBMS product accessed by the driver. The version is of the form ##.##.####, where the first two digits are the major version, the next two digits are the minor version, and the last four digits are the release version. The driver must render the DBMS product version in this form, but can also append the DBMS product-specific version as well. For example, “04.01.0000 Rdb 4.1”.

The following values for INFOTYPE_IV return the status, capability, or behavior of the data source. Information such as cursor and table characteristics is returned in the formats specified in the table.

INFOTYPE_IV

Returns

EDS_ACCESSIBLE_TABLES

A character string. “Y” if the user is guaranteed SELECT privileges to all tables returned by EDSTables, “N” if there may be tables returned that the user cannot access.

EDS_ACCESSIBLE _PROCEDURES

A character string. “Y” if the user can execute all procedures returned by EDSProcedures, “N” if there may be procedures returned that the user cannot execute.

EDS_CURSOR_COMMIT _BEHAVIOR

An integer value indicating how a COMMIT operation affects cursors in the data source: 0 = Close and delete cursors; your application must prepare and execute the next statement. 1 = Close cursors. Your application can call EDSExecute on the statement handle without calling EDSPrepare again. 2 = Preserve cursors in the same position as before the COMMIT operation; your application can execute or fetch without preparing the statement again.

EDS_CURSOR_ROLLBACK _BEHAVIOR

A 16-bit integer indicating how a ROLLBACK operation affects cursors in the data source. One of the following values: 0 = Close and delete cursors; your application must prepare and execute the next statement. 1 = Close cursors. Your application can call EDSExecute on the statement handle without calling EDSPrepare again. 2 = Preserve cursors in the same position as before the ROLLBACK operation; your application can execute or fetch without preparing the statement again.

EDS_DATA_SOURCE_READ_ONLY

A character string. “Y” if the data source is set to READ ONLY mode, “N” if it is otherwise. This characteristic pertains only to the data source itself, it is not a characteristic of the driver that enables access to the data source.

EDS_DEFAULT_TXN _ISOLATION

An integer representing a 32-bit bitmask that indicates the default transaction isolation level supported by the driver or data source, or zero if the data source does not support transactions: EDS_TXN_READ_UNCOMMITTED = Changes are immediately perceived by all transactions (dirty read, non-repeatable read, and phantoms are possible). EDS_TXN_READ_COMMITTED = Row read by transaction 1 can be altered and committed by transaction 2 (non repeatable read and phantoms are possible). EDS_TXN_REPEATABLE_READ = A transaction can add or remove rows matching the search condition or a pending transaction (repeatable read, but phantoms are possible). EDS_TXN_SERIALIZABLE = Data affected by pending transaction is not available to other transactions (repeatable read, but phantoms are not possible). EDS_TXN_VERSIONING = Data affected by pending transaction is not available to other transactions, but higher concurrency is possible than with isolation level 3. Typically, level 3 is attained by using locking protocols which reduce concurrency; level 4 is typically attained by a non-locking protocol such as “record versioning.” For example, Oracle’s Read Consistency isolation level is level 4. The integer value returned represents a 32-bit bitmask. To determine which options are included, use EDSQueryBitmask.

EDS_EXPRESSIONS_IN_ORDERBY

A character string; “Y” if the data source supports expressions in the ORDER BY list, “N” if it does not.

EDS_IDENTIFIER_CASE

An integer value as follows: 1 = Names must be upper case 2 = Names must be lower case 3 = Names are case sensitive and can be mixed 4 = Names are not case-sensitive

EDS_IDENTIFIER_QUOTE

The character string used to surround a _CHARdelimited identifier. If the data source does not support delimited identifiers, a blank is returned.

EDS_MAX_COLUMN_NAME

An integer value specifying the maximum _LEN length of a column name in the data source.

EDS_MAX_CURSOR_NAME

An integer value specifying the maximum _LEN length of a cursor name in the data source.

EDS_MAX_OWNER_NAME_LEN

An integer value specifying the maximum length of an owner name in the data source. A length of zero indicates that the data source does not support owner name as a qualifier of a table name.

EDS_MAX_PROCEDURE_NAME_LEN

An integer value specifying the maximum length of a procedure name in the data source. A length of zero indicates that the data source does not support procedures.

EDS_MAX_QUALIFIER_NAME_LEN

An integer value specifying the maximum length of a qualifier name in the data source. A length of zero indicates that the data source does not support qualifier name as a qualifier of a table name.

EDS_MAX_TABLE

An integer value specifying the maximum _NAME_LEN length of a table name in the data source.

EDS_MULT_RESULT_SETS

A character string. “Y” if the database supports multiple result sets, “N” if it does not.

EDS_MULTIPLE_ACTIVE_TXN

A character string. “Y” if active transactions on multiple connections are allowed, “N” if only one connection at a time can have an active transaction.

EDS_OUTER_JOINS

A character string. “Y” if the data source supports outer joins and the driver supports the ODBC outer join request syntax, “N” otherwise.

EDS_OWNER_TERM

A character string with the data source vendor’s name for an owner; for example, “owner”, “Authorization ID”, or “Schema”.

EDS_PROCEDURE_TERM

A character string with the data source vendor’s name for a procedure; for example, “database procedure”, “stored procedure”, or “procedure”.

EDS_QUALIFIER_NAME_SEPARATOR

A character string. The character(s) that the data source defines as the separator between a qualifier name and the qualified name element that follows it.

EDS_QUALIFIER_TERM

A character string with the data source vendor’s name for a qualifier; for example, “database” or “directory”.

EDS_SCROLL _CONCURRENCY

An integer value representing a 32-bit bitmask enumerating the concurrency control options supported for scrollable cursors. The following bit masks are used in conjunction with the flag to determine which options are supported:

EDS_SCCO_READ_ONLY

EDS_SCCO_LOCK

EDS_SCCO_TIMESTAMP

EDS_SCCO_VALUES

 

The integer value returned represents a 32-bit bitmask. To determine which options are included, use EDSQueryBitmask.

EDS_SCROLL_OPTIONS

An integer value representing a 32-bit bitmask enumerating the scroll options supported for scrollable cursors.

The following bit masks are used in conjunction with the flag to determine which options are supported:

EDS_SO_FORWARD_ONLY

EDS_SO_KEYSET_DRIVEN

EDS_SO_DYNAMIC

EDS_SO_MIXED

The integer value returned represents a 32-bit bitmask. To determine which options are included, use EDSQueryBitmask.

EDS_TABLE_TERM

A character string with the data source vendor’s name for a table; for example, “table” or “file”.

EDS_TXN_CAPABLE

An integer value describing the transaction support in the driver or data source:

0 = transactions not supported.

1 = transactions can only contain DML statements (SELECT, INSERT, UPDATE, DELETE).

2 = transactions can contain DDL statements (CREATE TABLE, DROP INDEX, etc.) and DML statements in any order.

EDS_TXN_ISOLATION _OPTIONS

A 32-bit bitmask enumerating the transaction isolation levels available from the driver or data source. The following bit masks are used in conjunction with the flag to determine which options are supported:

EDS_TXN_READ_UNCOMMITTED

EDS_TXN_READ_COMMITTED

EDS_TXN_REPEATABLE_READ

EDS_TXN_SERIALIZABLE

EDS_TXN_VERSIONING

 

The integer value returned represents a 32-bit bitmask. To determine which options are included, use EDSQueryBitmask.

For descriptions of these isolation levels, refer to the description of EDS_DEFAULT_TXN_ISOLATION.

EDS_USER_NAME

A character string with the name used in a particular database, which can be different from the login name.

The following values for INFOTYPE_IV return information about scalar functions supported by the data source and the driver. For each group of functions, a flag is returned that enumerates the scalar functions in the group that are supported by the data source and the driver.

INFOTYPE_IV

Returns

EDS_CONVERT_FUNCTIONS

An integer representing a 32-bit bitmask enumerating the scalar conversion functions supported by the driver and associated data source.

The following bitmask is used to determine which conversion functions are supported:

EDS_FN_CVT_CONVERT

The integer value returned represents a 32-bit bitmask. To determine which options are included, use EDSQueryBitmask.

EDS_NUMERIC_FUNCTIONS

An integer representing a 32-bit bitmask

enumerating the scalar numeric functions

supported by the driver and associated data

source.

The following bit masks are used to determine which numeric functions are supported:

EDS_FN_NUM_ABS

EDS_FN_NUM_ACOS

EDS_FN_NUM_ASIN

EDS_FN_NUM_ATAN

EDS_FN_NUM_ATAN2

EDS_FN_NUM_CEILING

EDS_FN_NUM_COS

EDS_FN_NUM_COT

EDS_FN_NUM_EXP

EDS_FN_NUM_FLOOR

EDS_FN_NUM_LOG

EDS_FN_NUM_MOD

EDS_FN_NUM_RAND

EDS_FN_NUM_PI

EDS_FN_NUM_SIGN

EDS_FN_NUM_SIN

EDS_FN_NUM_SQRT

EDS_FN_NUM_TAN

The integer value returned represents a 32-bit bitmask. To determine which options are included, use EDSQueryBitmask.

EDS_STRING_FUNCTIONS        

An integer representing a 32-bit bitmask enumerating the scalar string functions supported by the driver and associated data source. The following bit masks are used to determine which string functions are supported:

EDS_FN_STR_ASCII

EDS_FN_STR_CHAR

EDS_FN_STR_CONCAT

EDS_FN_STR_INSERT

EDS_FN_STR_LEFT

EDS_FN_STR_LTRIM

EDS_FN_STR_LENGTH

EDS_FN_STR_LOCATE

EDS_FN_STR_LCASE

EDS_FN_STR_REPEAT

EDS_FN_STR_REPLACE

EDS_FN_STR_RIGHT

EDS_FN_STR_RTRIM

EDS_FN_STR_SUBSTRING

EDS_FN_STR_UCASE

 

The integer value returned represents a 32-bit bitmask. To determine which options are included, use EDSQueryBitmask.

EDS_SYSTEM_FUNCTIONS        

An integer representing a 32-bit bitmask enumerating the scalar system functions supported by the driver and associated data source. The following bit masks are used to determine which system functions are supported: EDS_FN_SYS_USERNAME EDS_FN_SYS_DBNAME EDS_FN_SYS_IFNULL The integer value returned represents a 32-bit bitmask. To determine which options are included, use EDSQueryBitmask.

EDS_TIMEDATE _FUNCTIONS

An integer representing a 32-bit bitmask enumerating the scalar date and time functions supported by the driver and associated data source. The following bit masks are used to determine which date and time functions are supported:

EDS_FN_TD_NOW

EDS_FN_TD_CURDATE

EDS_FN_TD_DAYOFMONTH

EDS_FN_TD_DAYOFWEEK

EDS_FN_TD_DAYOFYEAR

EDS_FN_TD_MONTH

EDS_FN_TD_QUARTER

EDS_FN_TD_WEEK

EDS_FN_TD_YEAR

EDS_FN_TD_CURTIME

EDS_FN_TD_HOUR

EDS_FN_TD_MINUTE

EDS_FN_TD_SECOND

 

The integer value returned represents a 32-bit bitmask. To determine which options are included, use EDSQueryBitmask.

Return Values

EDSGetInfo returns EDS_SUCCESS, EDS_SUCCESS_WITH_INFO, EDS_ERROR, or EDS_INVALID_HANDLE.

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

The following table lists possible SQLSTATE values:

SQL

STATE

Error

Description

08003

Connection not open

The type of information requested in INFOTYPE_IV requires an open connection. Of the information types reserved by ODBC, only EDS_ODBC_VER can be returned without an open connection.

22003

Numeric value out of range

Returning the requested information would have caused a loss of numeric or binary significance.

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.

S1009

Invalid argument value

The INFOTYPE_IV was EDS_DRIVER_HSTMT and the value pointed to by INFOVALUE_IV was not a valid handle.

S1010

Function sequence error

An asynchronously executing function was called for a statement handle associated with the connection handle and was still executing when EDSGetInfo was called.

S1096

Information type out of range

An invalid INFOTYPE_IV was specified.

S1C00

Driver not capable

The specified INFOTYPE_IV was valid, but is not supported by the driver or does not apply to the data source.

S1T00

Timeout expired

The timeout period expired before the data source returned the requested information. The timeout period is set through EDSSetStmtOption, EDS_QUERY_TIMEOUT.

See Also

EDSGetFunctions lists functions supported by the data source.

EDSGetTypeInfo lists information about data types supported by the data source.

EDSGetStmtOption and EDSGetConnectOption list current settings of options that govern aspects of driver operation.