IBM Books

Call Level Interface Guide and Reference

Converting Timestamp C Data to SQL Data

The timestamp C data type is:

SQL_C_TIMESTAMP

Table 215. Converting Timestamp C Data to SQL Data
fSQLType Test SQLSTATE
SQL_CHAR SQL_VARCHAR Column length >= Display size 00000
19 <= Column length < Display size a 22001
Column length < 19 22003
SQL_DATE Data value is a valid date b 22001
Data value is not a valid date 22007
SQL_TIME Data value is a valid time c 22001
Data value is not a valid time 22007
SQL_TIMESTAMP Data value is a valid timestamp 00000
Data value is not a valid timestamp 22007
Note:
a
The fractional seconds of the timestamp are truncated.
b
The time portion of the timestamp is deleted.
c
The date portion of the timestamp is deleted.

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 ]