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 [7]
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 [2]
Data converted with truncation of fractional digits [1]
Conversion of data would result in loss of whole (as opposed to fractional) digits [2]
Data is not a numeric-literal [2]
|
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 [7]
SQL_C_FLOAT
SQL_C_DOUBLE
|
Data is within the range of the data type to which the number is being converted [1]
Data is outside the range of the data type to which the number is being converted [1]
Data is not a numeric-literal [2]
|
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 [1]
Data value is a valid timestamp-value; time portion is zero [1]
Data value is not a valid date-value or timestamp_value [1]
|
Data
Data
Truncated data
Undefined
|
6 [2]
6 [2]
6 [2]
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 [1]
Data value is a valid timestamp-value or a valid time_value; fractional seconds portion is zero [1] [4]
Data value is not a valid timestamp-value or time_value [1]
|
Data
Data
Truncated data
Undefined
|
6 [2]
6 [2]
6 [2]
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 [1] [4]
Data value is a valid timestamp-value or a valid time_value; fractional seconds portion truncated [1]
Data value is a valid date-value [1]
Data value is a valid time_value [1]
Data value is not a valid date_value, time_value, or timestamp_value [1]
|
Data
Truncated data
Data [6]
Data [7]
Undefined
|
16 [2]
16 [2]
16 [2]
16 [2]
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 [3]
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 [1]
Data converted with truncation of fractional digits [1]
Conversion of data would result in loss of whole (as opposed to fractional) digits [1]
|
Data
Truncated data Undefined
|
Size of the C data type
Size of the C data type
Undefined
|
N/A
01S07
22003
|
APPROXIMATE NUMERIC TYPES [3]
SQL_C_FLOAT
SQL_C_DOUBLE
|
Data is within the range of the data type to which the number is being converted [1]
Data is outside the range of the data type to which the number is being converted [1]
|
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 [1]
|
Data
|
6 [3]
|
N/A
|
SQL_C_TIMESTAMP
|
None [1]
|
Data [2]
|
16 [3]
|
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 [1]
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 [1]
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 [1]
|
Data
|
6 [3]
|
N/A
|
SQL_C_TIMESTAMP
|
None [1]
|
Data [2]
|
16 [3]
|
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 [2]
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 [2]
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 [1]
Time portion of timestamp is non-zero [1]
|
Data
Truncated data [3]
|
6 [6]
6 [6]
|
N/A
01S07
|
SQL_C_TYPE_TIME
|
Fractional seconds portion of timestamp is zero [1]
Fractional seconds portion of timestamp is non-zero [1]
|
Data [4]
|
6 [6]
6 [6]
|
N/A
01S07
|
SQL_C_TYPE_TIMESTAMP
|
Fractional seconds portion of timestamp is not truncated [1]
Fractional seconds portion of timestamp is truncated [1]
|
Data [5]
Truncated data [5]
|
6 [6]
6 [6]
|
N/A
01S07
|