The numeric SQL data types are:
Table 203. Converting Numeric SQL Data to C Data
fCType | Test | rgbValue | pcbValue | SQLSTATE | ||
---|---|---|---|---|---|---|
SQL_C_CHAR | Display size < cbValueMax | Data | Length of data | 00000 | ||
Number of significant digits < cbValueMax | Truncated data | Length of data | 01004 | |||
Number of significant digits >= cbValueMax | Untouched | Length of data | 22003 | |||
SQL_C_SHORT SQL_C_LONG SQL_C_FLOAT SQL_C_DOUBLE 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 | Truncated data | Size of the C data type | 01004 | |||
Conversion of data would result in loss of significant digits a | Untouched | Size of the C data type | 22003 | |||
SQLSTATE 00000 is not returned by SQLError(), rather it is indicated when the function returns SQL_SUCCESS. |