Please enable JavaScript to view this site.

ESL Documentation

The length of a column is the maximum number of bytes returned to your application when data is transferred to its default ESL data type.  Note that the length of a column may be different from the number of bytes required to store the data on the data source. The following table defines the length for each SQL data type.

SQLTYPE

Length

EDS_SQL_CHAR EDS_SQL_VARCHAR

The defined length of the column. For example, the length of a column defined as CHAR(10) is 10.

EDS_SQL_LONGVARCHAR

The maximum length of the column.

EDS_SQL_DECIMAL EDS_SQL_NUMERIC

The maximum number of digits plus two. Since these data types are returned as character strings, characters are needed for the digits, a sign, and a decimal point. For example, the length of a column defined as NUMERIC(10,3) is 12.

EDS_SQL_BIT EDS_SQL_TINYINT

1 (one byte).

EDS_SQL_SMALLINT

2 (two bytes).

EDS_SQL_INTEGER

4 (four bytes).

EDS_SQL_BIGINT

20 (since this data type is returned as a character string, characters are needed for 19 digits and a sign).

EDS_SQL_REAL

4 (four bytes).

EDS_SQL_DOUBLE

8 (eight bytes).

EDS_SQL_BINARY EDS_SQL_VARBINARY

The defined length of the column. For example, the length of a column defined as BINARY(10) is 10.

EDS_SQL_LONGVARBINARY

The maximum length of the column.

EDS_SQL_DATE

6

EDS_SQL_TIME EDS_SQL_TIMESTAMP

16