C Variable Type Codes
The type codes shown in SQLDA Structure Usage are the types that describe Ingres result fields and columns. For example, the SQL types long varchar, date, decimal and money do not describe a program variable, but rather data types that are compatible with the C types char and double. When these types are returned by the describe statement, the type code must be changed to a compatible C or SQL/C type.
The following table describes the type codes to use with C variables that will be pointed at by the sqldata pointers:
One-byte integer data types are specified as a char variable with no specified array dimension. Do not confuse this data type with string data types that are specified as a char variable with a fixed array dimension.
You can specify nullable data types (those variables that are associated with a null indicator) by assigning the negative of the type code to the sqltype field. If the type is negative, a null indicator must be pointed at by using the sqlind field.