IBM Books

Call Level Interface Guide and Reference

Converting Numeric C Data to SQL Data

The numeric C data types are:

SQL_C_SHORT
SQL_C_LONG
SQL_C_FLOAT
SQL_C_DOUBLE
SQL_C_TINYINT
SQL_C_BIT

Table 210. Converting Numeric C Data to SQL Data
fSQLType Test SQLSTATE
SQL_DECIMAL
SQL_NUMERIC
SQL_SMALLINT
SQL_INTEGER
SQL_REAL
SQL_FLOAT
SQL_DOUBLE

Data converted without truncation 00000
Data converted with truncation, but without loss of significant digits 22001
Conversion of data would result in loss of significant digits 22003
SQL_CHAR
SQL_VARCHAR

Data converted without truncation. 00000
Conversion of data would result in loss of significant digits. 22003

Note:SQLSTATE 00000 is not returned by SQLError(), rather it is indicated when the function returns SQL_SUCCESS.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]