SQL Type Identifier
|
Test
|
SQLSTATE
|
---|---|---|
SQL_CHAR
SQL_VARCHAR
SQL_LONGVARCHAR
|
Byte length of data <= Column length
Byte length of data > Column length
|
N/A
22001
|
SQL_WCHAR
SQL_WVARCHAR
SQL_WLONGVARCHAR
|
Character length of data <= Column length
Character length of data > Column length
|
N/A
22001
|
SQL_DECIMAL
SQL_NUMERIC
SQL_TINYINT
SQL_SMALLINT
SQL_INTEGER
SQL_BIGINT
|
Data converted without truncation
Data converted with truncation of fractional digits [e]
Conversion of data would result in loss of whole (as opposed to fractional) digits [e]
Data value is not a numeric-literal
|
N/A
22001
22001
22018
|
SQL_REAL
SQL_FLOAT
SQL_DOUBLE
|
Data is within the range of the data type to which the number is being converted
Data is outside the range of the data type to which the number is being converted
Data value is not a numeric-literal
|
N/A
22003
22005
|
SQL_BIT
|
Data is 0 or 1
Data is greater than 0, less than 2, and not equal to 1
Data is less than 0 or greater than or equal to 2
Data is not a numeric-literal.
Note solidDB® does not support SQL_BIT.
|
N/A
22001
22003
22018
|
SQL_BINARY
SQL_VARBINARY
SQL_LONG-VARBINARY
|
(Byte length of data) / 2 <= Column byte length
(Byte length of data) / 2 > Column byte length
Data value is not a hexadecimal value
|
N/A 22001 22018
|
SQL_TYPE_DATE
|
Data value is a valid ODBC_date_literal
Data value is a valid ODBC_timestamp_literal; time portion is zero
Data value is a valid ODBC_timestamp_literal; time portion is non-zero [a]
Data value is not a valid ODBC_date_literal or ODBC_timestamp_literal
|
N/A
N/A
22008
22018
|
SQL_TYPE_TIME
|
Data value is a valid ODBC_time_literal
Data value is a valid ODBC_timestamp_literal; fractional seconds portion is zero [b]
Data value is a valid ODBC_timestamp_literal; fractional seconds portion is non-zero [b]
Data value is not a valid ODBC_time_literal or ODBC_timestamp_literal
|
N/A
N/A
22008
22018
|
SQL_TYPE_TIMESTAMP
|
Data value is a valid ODBC_timestamp_literal; fractional seconds portion not truncated
Data value is a valid ODBC-timestamp-literal; fractional seconds portion truncated
Data value is a valid ODBC-date-literal [c]
Data value is a valid ODBC-time-literal [d]
Data value is not a valid ODBC-date-literal, ODBC-time-literal, or ODBC-timestamp-literal
|
N/A
22008
N/A
N/A
22018
|
ParameterType
|
Test
|
SQLSTATE
|
---|---|---|
SQL_CHAR
SQL_VARCHAR
SQL_LONGVARCHAR
|
Number of digits <= Column byte length
Number of digits > Column byte length
|
N/A
22001
|
SQL_WCHAR
SQL_WVARCHAR
SQL_WLONGVARCHAR
|
Number of characters <= Column character length
Number of characters > Column character length
|
N/A
22001
|
SQL_DECIMAL [a] SQL_NUMERIC [a] SQL_TINYINT [a] SQL_SMALLINT [a] SQL_INTEGER [a] SQL_BIGINT [a]
|
Data converted without truncation or with truncated of fractional digits
Data converted with truncation of whole digits
|
N/A
22003
|
SQL_REAL
SQL_FLOAT
SQL_DOUBLE
|
Data is within the range of the data type to which the number is being converted
Data is outside the range of the data type to which the number is being converted
|
N/A
22003
|
Note [a] For the "n/a" case, a driver may optionally return SQL_SUCCESS_WITH_INFO and 01S07 when there is a fractional truncation.
|
SQL Type Identifier
|
Test
|
SQLSTATE
|
---|---|---|
SQL_CHAR
SQL_VARCHAR
SQL_LONGVARCHAR
SQL_WCHAR
SQL_WVARCHAR
SQL_WLONGVARCHAR
|
None
|
N/A
|
SQL_DECIMAL
SQL_NUMERIC
SQL_TINYINT
SQL_SMALLINT
SQL_INTEGER
SQL_BIGINT
SQL_REAL
SQL_FLOAT
SQL_DOUBLE
|
None
|
N/A
|
SQL Type Identifier
|
Test
|
SQLSTATE
|
---|---|---|
SQL_CHAR
SQL_VARCHAR
SQL_LONGVARCHAR
|
Byte length of data <= Column byte length
Byte length of data > Column length
|
N/A
22001
|
SQL_WCHAR
SQL_WVARCHAR
SQL_WLONGVARCHAR
|
Character length of data <= Column character length
Character length of data > Column character length
|
N/A
22001
|
SQL_DECIMAL
SQL_NUMERIC
SQL_TINYINT
SQL_SMALLINT
SQL_INTEGER
SQL_BIGINT
SQL_REAL
SQL_FLOAT
SQL_DOUBLE
SQL_TYPE_DATE
SQL_TYPE_TIME
SQL_TYPE_TIMESTAMP
|
Byte length of data = SQL data length
Length of data <> SQL data length
|
N/A
22003
|
SQL_BINARY
SQL_VARBINARY
SQL_LONGVARBINARY
|
Length of data <= Column length
Length of data > Column length
|
N/A
22001
|
SQL Type Identifier
|
Test
|
SQLSTATE
|
---|---|---|
SQL_CHAR
SQL_VARCHAR
SQL_LONGVARCHAR
|
Column byte length >= 10
Column byte length < 10
Data value is not a valid date
|
N/A
22001
22008
|
SQL_CHAR
SQL_VARCHAR
SQL_LONGVARCHAR
|
Column character length >= 10
Column character length < 10
Data value is not a valid date
|
N/A
22001
22008
|
SQL_TYPE_DATE
|
Data value is a valid date
Data value is not a valid date
|
N/A
22007
|
SQL_TYPE_TIMESTAMP
|
Data value is a valid date [a]
Data value is not a valid date
|
N/A
22007
|
Note [a] The time portion of the timestamp is set to zero.
|
SQL Type Identifier
|
Test
|
SQLSTATE
|
---|---|---|
SQL_CHAR
SQL_VARCHAR SQL_LONGVARCHAR
|
Column byte length >= 8
Column byte length < 8
Data value is not a valid time
|
N/A
22001
22008
|
SQL_WCHAR
SQL_WVARCHAR
SQL_WLONGVARCHAR
|
Column character length >= 8
Column character length < 8
Data value is not a valid time
|
N/A
22001
22008
|
SQL_TYPE_TIME
|
Data value is a valid time
Data value is not a valid time
|
N/A
22007
|
SQL_TYPE_TIMESTAMP
|
Data value is a valid time [a]
Data value is not a valid time
|
N/A
22007
|
Note [a] The date portion of the timestamp is set to the current date and the fractional seconds portion of the timestamp is set to zero.
|
SQL Type Identifier
|
Test
|
SQLSTATE
|
---|---|---|
SQL_CHAR
SQL_VARCHAR
SQL_LONGVARCHAR
|
Column byte length >= Character byte length
19 <= Column byte length < Character byte length
Column byte length < 19
Data value is not a valid date
|
N/A
22001
22001
22008
|
SQL_WCHAR
SQL_WVARCHAR
SQL_WLONGVARCHAR
|
Column character length >= Character length of data
19 <= Column character length < Character length of data
Column character length < 19
Data value is not a valid timestamp
|
N/A
22001
22001
22008
|
SQL_TYPE_DATE
|
Time fields are zero
Time fields are non-zero
Data value does not contain a valid date
|
N/A
22008
22007
|
SQL_TYPE_TIME
|
Fractional seconds fields are zero [a]
Fractional seconds fields are non-zero [a]
Data value does not contain a valid time
|
N/A
22008
22007
|
SQL_TYPE_TIMESTAMP
|
Fractional seconds fields are not truncated
Fractional seconds fields are truncated
Data value is not a valid timestamp
|
N/A
22008
22007
|
Note [a] The date fields of the timestamp structure are ignored.
|