The character SQL data types are:
Table 201. Converting Character SQL Data to C Data
fCType | Test | rgbValue | pcbValue | SQLSTATE | ||
---|---|---|---|---|---|---|
SQL_C_CHAR | Length of data < cbValueMax | Data | Length of data | 00000 | ||
Length of data >= cbValueMax | Truncated data | Length of data | 01004 | |||
SQL_C_BINARY | Length of data <= cbValueMax | Data | Length of data | 00000 | ||
Length of data > cbValueMax | Truncated data | Length of data | 01004 | |||
SQL_C_SHORT SQL_C_LONG SQL_C_FLOAT SQL_C_FLOAT SQL_C_TINYINT SQL_C_BIT | Data converted without truncation a | Data | Size of the C data type |
00000 | ||
Data converted with truncation, but without loss of significant digits a | Data | Size of the C data type | 01004 | |||
Conversion of data would result in loss of significant digitsa | Untouched | Size of the C data type | 22003 | |||
Data is not a number a | Untouched | Size of the C data type | 22005 | |||
SQL_C_DATE | Data value is a valid date a | Data | 6 b | 00000 | ||
Data value is not a valid date a | Untouched | 6 b | 22007 | |||
SQL_C_TIME | Data value is a valid time a | Data | 6 b | 00000 | ||
Data value is not a valid time a | Untouched | 6 b | 22007 | |||
SQL_C_TIMESTAMP | Data value is a valid timestamp a | Data | 16 b | 00000 | ||
Data value is not a valid timestamp a | Untouched | 16 b | 22007 | |||
SQLSTATE 00000 is not returned by SQLError(), rather it is indicated when the function returns SQL_SUCCESS. |