C to SQL: Date
The date HCL OneDB™ ODBC Driver C data type is SQL_C_DATE.
The following table shows the HCL
OneDB ODBC Driver SQL
data types to which date C data can be converted.
fSqlType | Test | SQLSTATE |
---|---|---|
SQL_CHAR SQL_LONGVARCHAR SQL_VARCHAR |
Column length 10. | N/A |
Column length < 10. | 22003 | |
Data value is not a valid date. | 22008 | |
SQL_DATE | Data value is a valid date. | N/A |
Data value is not a valid date. | 22008 | |
SQL_TIMESTAMP | Data value is a valid date. HCL OneDB ODBC driver sets the time portion of the time stamp to zero. | N/A |
Data value is not a valid date. | 22008 |
When HCL
OneDB ODBC Driver converts
date C data to character SQL data, the resulting character data is
in the yyyy-mm-dd
format.
HCL OneDB ODBC Driver ignores the value that the pcbValue argument of SQLBindParameter points to and the value of the cbValue argument of SQLPutData when it converts data from the date C data type. HCL OneDB ODBC Driver uses the size of rgbValue for the size of the date C data type.