C to SQL: Time stamp
The time stamp HCL OneDB™ ODBC Driver C data type is SQL_C_TIMESTAMP.
fSqlType | Test | SQLSTATE |
---|---|---|
SQL_CHAR SQL_LONGVARCHAR SQL_VARCHAR |
Column length Display size. | N/A |
19 < Column length < Display size. HCL OneDB ODBC Driver truncates the fractional seconds of the time stamp. |
01004 | |
Column length < 19. | 22003 | |
Data value is not a valid date. | 22008 | |
SQL_DATE | Time fields are zero. | N/A |
Time fields are non-zero. HCL OneDB ODBC Driver truncates the time fields of the time stamp structure. |
01004 | |
Data value does not contain a valid date. | 22008 | |
SQL_TIMESTAMP | Fractional seconds fields are not truncated. | N/A |
Fractional seconds fields are truncated. HCL OneDB ODBC Driver truncates the fractional seconds fields of the time stamp structure. |
01004 | |
Data value is not a valid time stamp. | 22008 |
When HCL
OneDB ODBC Driver converts
time stamp C data to character SQL data, the resulting character data
is in the yyyy-mm-dd hh:mm:ss[.f...]
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 time stamp C data type. HCL OneDB ODBC Driver uses the size of rgbValue for the size of the time stamp C data type.