C Type Identifier
|
Test
|
*TargetValuePtr
|
*StrLen_or_IndPtr
|
SQLSTATE
|
---|---|---|---|---|
SQL_C_CHAR
|
Byte length of data < BufferLength
Byte length of data >= BufferLength
|
Data Truncated data
|
Length of data in bytes
Length of data in bytes
|
N/A
01004
|
SQL_C_WCHAR
|
Character length of data < BufferLength
(Character length of data) >= BufferLength
|
Data Truncated data
|
Length of data in characters
Length of data in characters
|
N/A
01004
|
EXACT NUMERIC TYPES [h]
SQL_C_STINYINT
SQL_C_UTINYINT
SQL_C_TINYINT
SQL_C_SSHORT
SQL_C_USHORT
SQL_C_SHORT
SQL_C_SLONG
SQL_C_ULONG
SQL_C_LONG
SQL_C_SBIGINT
SQL_C_UBIGINT
SQL_C_NUMERIC
|
Data converted without truncation [b]
Data converted with truncation of fractional digits [a]
Conversion of data would result in loss of whole (as opposed to fractional) digits [b]
Data is not a numeric-literal [b]
|
Data
Truncated data Undefined Undefined
|
Number of bytes of the C data type
Number of bytes of the C data type
Undefined
Undefined
|
N/A
01S07
22003
22018
|
APPROXIMATE NUMERIC TYPES [h]
SQL_C_FLOAT
SQL_C_DOUBLE
|
Data is within the range of the data type to which the number is being converted [a]
Data is outside the range of the data type to which the number is being converted [a]
Data is not a numeric-literal [b]
|
Data
Undefined
Undefined
|
Size of the C data type
Undefined
Undefined
|
N/A
2003
22018
|
SQL_C_BINARY
|
Byte length of data <= BufferLength
Byte length of data > BufferLength
|
Data
Truncated data
|
Length of data
Length of data
|
N/A
01004
|
SQL_C_TYPE_DATE
|
Data value is a valid date-value [a]
Data value is a valid timestamp-value; time portion is zero [a]
Data value is a valid timestamp-value; time portion is nonzero [a], [c],
Data value is not a valid date-value or timestamp_value [a]
|
Data
Data
Truncated data
Undefined
|
6 [b]
6 [b]
6 [b]
Undefined
|
N/A
N/A
01S07
22018
|
SQL_C_TYPE_TIME
|
Data value is a valid time-value and the fractional seconds value is 0 [a]
Data value is a valid timestamp-value or a valid time_value; fractional seconds portion is zero [a],[d]
Data value is a valid timestamp-value ; fractional seconds portion is nonzero [a], [d], [e]
Data value is not a valid timestamp-value or time_value [a]
|
Data
Data
Truncated data
Undefined
|
6 [b]
6 [b]
6 [b]
Undefined
|
N/A
N/A
01S07
22018
|
SQL_C_TYPE_TIMESTAMP
|
Data value is a valid timestamp-value or a valid time_value; fractional seconds portion not truncated [a], [d]
Data value is a valid timestamp-value or a valid time_value; fractional seconds portion truncated [a]
Data value is a valid date-value [a]
Data value is a valid time_value [a]
Data value is not a valid date_value, time_value, or timestamp_value [a]
|
Data
Truncated data
Data [f]
Data [g]
Undefined
|
16 [b]
16 [b]
16 [b]
16 [b]
Undefined
|
N/A
01S07
N/A
N/A
22018
|
C Type Identifier
|
Test
|
*TargetValuePtr
|
*StrLen_or_IndPtr
|
SQLSTATE
|
---|---|---|---|---|
SQL_C_CHAR
|
Character byte length <
|
Data
|
Length of data in
|
N/A
|
|
BufferLength
|
Truncated data
|
bytes
|
01004
|
|
Number of whole (as opposed to fractional) digits <
|
Undefined
|
Length of data in bytes
|
22003
|
|
BufferLength
|
|
Undefined
|
|
|
Number of whole (as opposed
|
|
|
|
|
to fractional) digits ≥
|
|
|
|
|
BufferLength
|
|
|
|
SQL_C_WCHAR
|
Character length < BufferLength
Number of whole (as opposed to fractional) digits < BufferLength
Number of whole (as opposed to fractional) digits ≥ BufferLength
|
Data
Truncated data Undefined
|
Length of data in bytes
Length of data in bytes
Undefined
|
N/A
01004
22003
|
EXACT NUMERIC TYPES [c]
SQL_C_STINYINT
SQL_C_UTINYINT
SQL_C_TINYINT
SQL_C_SBIGINT
SQL_C_UBIGINT
SQL_C_SSHORT
SQL_C_USHORT
SQL_C_SHORT a
SQL_C_SLONG
SQL_C_ULONG
SQL_C_LONG
SQL_C_NUMERIC
|
Data converted without truncation [a]
Data converted with truncation of fractional digits [a]
Conversion of data would result in loss of whole (as opposed to fractional) digits [a]
|
Data
Truncated data Undefined
|
Size of the C data type
Size of the C data type
Undefined
|
N/A
01S07
22003
|
APPROXIMATE NUMERIC TYPES [c]
SQL_C_FLOAT
SQL_C_DOUBLE
|
Data is within the range of the data type to which the number is being converted [a]
Data is outside the range of the data type to which the number is being converted [a]
|
Data Undefined
|
Size of the C data type
Undefined
|
N/A
22003
|
SQL_C_BINARY
|
Length of data ≤ BufferLength Length of data > BufferLength
|
Data Undefined
|
Length of data Undefined
|
N/A
22003
|
C Type Identifier
|
Test
|
*TargetValuePtr
|
*StrLen_or_IndPtr
|
SQLSTATE
|
---|---|---|---|---|
SQL_C_CHAR
|
(Byte length of data) * 2 < BufferLength
(Byte length of data) * 2 >= BufferLength
|
Data Truncated data
|
Length of data in bytes
Length of data in bytes
|
N/A
01004
|
SQL_C_WCHAR
|
(Character length of data) * 2 < BufferLength
(Character length of data) * 2 >= BufferLength
|
Data Truncated data
|
Length of data in bytes
Length of data in bytes
|
N/A
01004
|
SQL_C_BINARY
|
Byte length of data <= BufferLength
Byte Length of data > BufferLength
|
Data Truncated data
|
Length of data in bytes
Length of data in bytes
|
N/A
01004
|
C Type Identifier
|
Test
|
*TargetValuePtr
|
*StrLen_or_IndPtr
|
SQLSTATE
|
---|---|---|---|---|
SQL_C_CHAR
|
BufferLength > Character byte length
11<= BufferLength <= Character byte length
BufferLength < 11
|
Data
Truncated data Undefined
|
10
Length of data in bytes
Undefined
|
N/A
01004
22003
|
SQL_C_WCHAR
|
BufferLength > Character length
11<= BufferLength <= Character length
BufferLength < 11
|
Data
Truncated data Undefined
|
10
Length of data in bytes
Undefined
|
N/A
01004
22003
|
SQL_C_BINARY
|
Byte length of data <= BufferLength
Byte length of data > BufferLength
|
Data Undefined
|
Length of data in bytes
Undefined
|
N/A
22003
|
SQL_C_DATE
|
None [a]
|
Data
|
6 [c]
|
N/A
|
SQL_C_TIMESTAMP
|
None [a]
|
Data [b]
|
16 [c]
|
N/A
|
C Type Identifier
|
Test
|
*TargetValuePtr
|
*StrLen_or_IndPtr
|
SQLSTATE
|
---|---|---|---|---|
SQL_C_CHAR
|
BufferLength > Character byte length
9 <= BufferLength <= Character byte length
BufferLength < 9
|
Data
Truncated data [a]
Undefined
|
Length of data in bytes
Length of data in bytes
Undefined
|
N/A
01004
22003
|
SQL_C_WCHAR
|
BufferLength > Character byte length 9 <= BufferLength <= Character byte length BufferLength < 9
|
Data
Truncated data [a]
Undefined
|
Length of data in characters
Length of data in characters
Undefined
|
N/A
01004
22003
|
SQL_C_BINARY
|
Byte length of data <= BufferLength
Byte length of data > BufferLength
|
Data Undefined
|
Length of data in bytes
Undefined
|
N/A
22003
|
SQL_C_DATE
|
None [a]
|
Data
|
6 [c]
|
N/A
|
SQL_C_TIMESTAMP
|
None [a]
|
Data [b]
|
16 [c]
|
N/A
|
C Type Identifier
|
Test
|
*TargetValuePtr
|
*StrLen_or_IndPtr
|
SQLSTATE
|
---|---|---|---|---|
SQL_C_CHAR
|
BufferLength > Character byte length
20 <= BufferLength <= Character byte length
BufferLength < 20
|
Data
Truncated data [b]
Undefined
|
Length of data in bytes
Length of data in bytes
Undefined
|
N/A
01004
22003
|
SQL_C_WCHAR
|
BufferLength > Character byte length
20 <= BufferLength <= Character byte length
BufferLength < 20
|
Data
Truncated data [b]
Undefined
|
Length of data in characters
Length of data in characters
Undefined
|
N/A
01004
22003
|
SQL_C_BINARY
|
Byte length of data <= BufferLength
Byte length of data > BufferLength
|
Data Undefined
|
Length of data in bytes
Undefined
|
N/A
22003
|
SQL_C_TYPE_DATE
|
Time portion of timestamp is zero [a]
Time portion of timestamp is non-zero [a]
|
Data
Truncated data [c]
|
6 [f]
6 [f]
|
N/A
01S07
|
SQL_C_TYPE_TIME
|
Fractional seconds portion of timestamp is zero [a]
Fractional seconds portion of timestamp is non-zero [a]
|
Data [d]
Truncated data [d], [e]
|
6 [f]
6 [f]
|
N/A
01S07
|
SQL_C_TYPE_TIMESTAMP
|
Fractional seconds portion of timestamp is not truncated [a]
Fractional seconds portion of timestamp is truncated [a]
|
Data [e]
Truncated data [e]
|
6 [f]
6 [f]
|
N/A
01S07
|