Pascal Variable Type Codes
The type codes shown in
SQLDA Record Usage (see page
SQLDA Record Usage) in this chapter are the types that describe Ingres result fields or columns. For example, the SQL types
date and
money do not describe a program variable, but rather data types that are compatible with the Pascal character and numeric types. IISQ_LVCH_TYPE is SQL only character compatible too. When these types are returned by the
describe statement, the type code must be a change to a compatible Pascal or ESQL/Pascal type.
The following table describes the type codes to use with Pascal variables that will be pointed at by the sqldata pointers.
Nullable data types (those variables that are associated with a null indicator) are specified by assigning the negative of the type code to the
sqltype component. If the type is negative, a null indicator must be pointed at by the
sqlind component. The type of the null indicator must be a 2-byte integer (or the SQL-defined
indicator type). For information on how to declare and use a null indicator variable in Pascal, see
Pascal Variables and Data Types (see page
Pascal Variables and Data Types) in this chapter.
Character data and the SQLDA have the exact same rules as character data in regular Embedded SQL statements. For details of character string processing in SQL, see
Pascal Variables and Data Types (see page
Pascal Variables and Data Types) in this chapter.