Header files for data types

To use an SQL data type, your program must include the appropriate header file. SQL data types and ESQL/C header files shows the relationship between host-variable data types and header files for all database servers. SQL data types and ESQL/C header files that are specific to HCL OneDB shows the relationship between host-variable data types and header files that are specific to HCL OneDB™ with Universal Data Option.
Table 1. SQL data types and ESQL/C header files
SQL data type ESQL/C or C data type ESQL/C header file
BLOB ifx_lo_t locator.h
BOOLEAN boolean Defined automatically
BYTE ifx_loc_t or loc_t locator.h
CHAR(n)

CHARACTER(n)

fixchar array[n] or string array[n+1] Defined automatically
DATE date Defined automatically
DATETIME datetime or dtime_t datetime.h
DECIMAL

DEC

NUMERIC

MONEY

decimal or dec_t decimal.h
FLOAT

DOUBLE PRECISION

double Defined automatically
INT8 int8 int8.h
INTEGER

INT

4-byte integer Defined automatically
INTERVAL interval or intrvl_t datetime.h
LVARCHAR lvarchar array[n + 1] where n is the length of the longest string that might be stored in the LVARCHAR field. Defined automatically
MULTISET(e) collection Defined automatically
NCHAR(n) fixchar array[n] or string array[n+1] Defined automatically
NVARCHAR(m) varchar[m+1] or string array[m+1] Defined automatically
SERIAL 4-byte integer Defined automatically
SERIAL8 int8 int8.h
BIGINT BIGINT Defined automatically
BIGSERIAL BIGINT Defined automatically
SMALLFLOAT

REAL

float Defined automatically
SMALLINT short int Defined automatically
TEXT loc_t locator.h
VARCHAR(m,x) varchar[m+1] or string array[m+1] Defined automatically
Table 2. SQL data types and ESQL/C header files that are specific to HCL OneDB
SQL data type ESQL/C or C data type ESQL/C header file
BLOB ifx_lo_t locator.h
CLOB ifx_lo_t locator.h
LIST(e) collection Defined automatically
Opaque data type lvarchar or fixed binary or var binary User-defined header file that contains definition of internal structure for opaque type
ROW(...) row Defined automatically
SET(e) collection Defined automatically