ODBC Function
|
Returns
|
---|---|
SQLColumns
|
Transfer octet length of a column in specified tables (such as the base table, view, or a system table).
|
SQLColAttribute
|
Transfer octet length of columns at the data source.
|
SQLProcedureColumns
|
Transfer octet length of a column in a procedure.
|
SQL Type Identifier
|
Transfer Octet Length
|
---|---|
All character and binary types [a]
|
The defined or the maximum (for variable type) length of the column in bytes. This value matches the one in the SQL_DESC_OCTET_LENGTH descriptor field.
|
SQL_DECIMAL SQL_NUMERIC
|
The number of bytes required to hold the character representation of this data if the character set is ASCII, and twice this number if the character set is UNICODE. The character representation is the maximum number of digits plus two; the data is returned as a character string, where the characters are needed for digits, a sign, and a decimal point. For example, the transfer length of a column defined as NUMERIC(10,3) is 12 because there are 10 bytes for the digits, 1 byte for the sign, and 1 byte for the decimal point.
|
SQL_TINYINT
|
1
|
SQL_SMALLINT
|
2
|
SQL_INTEGER
|
4
|
SQL_BIGINT
|
The number of bytes required to hold the character representation of this data if the character set is ASCII, and twice this number if the character set is UNICODE. This data type is returned as a character string by default. The character representation consists of 20 characters for 19 digits and a sign (if signed), or 20 digits (if unsigned). The length is 20.
solidDB® supports only signed, not unsigned, BIGINT.
|
SQL_REAL
|
4
|
SQL_FLOAT
|
8
|
SQL_DOUBLE
|
8
|
All binary types [a]
|
The number of bytes required to store the defined (for fixed types) or maximum (for variable types) number of characters.
|
SQL_TYPE_DATE SQL_TYPE_TIME
|
6 (size of the structures SQL_DATE_STRUCT or SQL_TIME_STRUCT).
|
SQL_TYPE_TIMESTAMP
|
16 (size of the structure SQL_TIMESTAMP_STRUCT).
|