C data types

HCL OneDB™ ODBC Driver applications use C data types to store values that the application processes.

The following table describes the C data types that HCL OneDB ODBC Driver provides.
Important: String arguments in HCL OneDB ODBC driver functions are unsigned. Therefore, you need to cast a CString object as an unsigned string before you use it as an argument in the HCL OneDB ODBC driver function.
Value HCL OneDB ODBC driver C data type (fCType) HCL OneDB ODBC driver typedef Standard C data type
Binary SQL_C_BINARY UCHAR FAR * unsigned char FAR *
Boolean SQL_C_BIT UCHAR unsigned char
Character SQL_C_CHAR UCHAR FAR * unsigned char FAR *
Wide Character SQL_C_WCHAR WCHAR FAR * wchar_t FAR *
Date SQL_C_DATE DATE_STRUCT struct tagDATE_STRUCT{ SWORD year; UWORD month; UWORD day; }
Interval SQL_C_INTERVAL_YEAR SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_MONTH SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_DAY SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_HOUR SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_MINUTE SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_SECOND SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_YEAR _TO_MONTH SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_DAY _TO_HOUR SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_DAY_ TO_MINUTE SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_DAY_ TO_SECOND SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_HOUR _TO_MINUTE SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_HOUR _TO_SECOND SQL_INTERVAL_STRUCT C Interval Structure
SQL_C_INTERVAL_MINUTE _TO_SECOND SQL_INTERVAL_STRUCT C Interval Structure
Numeric SQL_C_DOUBLE SDOUBLE signed double
SQL_C_FLOAT SFLOAT signed float
SQL_C_LONG SDWORD signed long int
SQL_C_NUMERIC SQL_NUMERIC_STRUCT struct tag SQL_NUMERIC_STRUCT { SQLCHAR precision; SQLSCHAR scale; SQLCHAR sign; SQLCHAR val [SQL_MAX_ NUMERIC_LEN]; }SQL_NUMERIC_STRUCT;
SQL_C_SHORT SWORD signed short int
SQL_C_SLONG SDWORD signed long int
SQL_C_SSHORT SWORD signed short int
SQL_C_STINYINT SCHAR signed char
SQL_C_TINYINT SCHAR signed char
SQL_C_ULONG UDWORD unsigned long int
SQL_C_USHORT UWORD unsigned short int
SQL_C_UTINYINT UCHAR unsigned char
Time stamp SQL_C_TIMESTAMP TIMESTAMP_STRUCT struct tagTIMESTAMP_STRUCT { SWORD year; UWORD month; UWORD day; UWORD hour; UWORD minute; UWORD second; UDWORD fraction; }