SQL to C: Date

The date HCL OneDB™ ODBC Driver SQL data type is SQL_DATE.

The following table shows the HCL OneDB ODBC Driver C data types to which date SQL data can be converted. When HCL OneDB ODBC Driver converts date SQL data to character C data, the resulting string is in the yyyy-mm-dd format.

The HCL OneDB ODBC Driver C data types to which date SQL data can be converted.

fCType Test rgbValue pcbValue SQLSTATE
SQL_C_BINARY Length of data < cbValueMax Data Length of data N/A
Length of data > cbValueMax Untouched Untouched 22003
SQL_C_CHAR cbValueMax 11 Data 10 N/A
cbValueMax < 11 Untouched Untouched 22003
SQL_C_DATE HCL OneDB ODBC Driver ignores the value of cbValueMax for this conversion. HCL OneDB ODBC Driver uses the size of rgbValue for the size of the C data type. Data 6

(This is the size of the corresponding C data type.)

N/A
SQL_C_TIMESTAMP HCL OneDB ODBC Driver ignores the value of cbValueMax for this conversion. HCL OneDB ODBC Driver uses the size of rgbValue for the size of the C data type. Data

(HCL OneDB ODBC Driver sets the time fields of the time stamp structure to zero.)

16

(This is the size of the corresponding C data type.)

N/A