Constants for ESQL/C data types
The sqltypes.h header file contains defined constants for the Informix® ESQL/C data types.
The Informix® ESQL/C data types are assigned to host variables in the Informix® ESQL/C program. If your program initializes a column description, it usually obtains the column value from the Informix® ESQL/C host variable. To set the column data type for this value, the program must use the Informix® ESQL/C data types.
#define CCHARTYPE 100
#define CSHORTTYPE 101
#define CINTTYPE 102
#define CLONGTYPE 103
#define CFLOATTYPE 104
#define CDOUBLETYPE 105
Within the Informix® ESQL/C program that uses dynamic SQL statements, you can use the constants that are shown in preceding code fragment to set the data types of the associated host variables. Use the Informix® ESQL/C data type constants to set the data types of host variables used as input parameters to a dynamically defined SQL statement or as storage for column values that are returned by the database server. A sample program that executes a dynamic INSERT statement stores a TEXT value into a database table.