SQL Type Codes
The following table describes the data type codes to use with Ada variables that are pointed at by the sqldata pointers:
As described in (see page
Ada Variables and Data Types), all other types are compatible with the above Ada data types. For example, you can retrieve an SQL
date into an Ada
string variable, while you can retrieve
money into a
long_float variable.
You can specify nullable data types (those variables that are associated with a null indicator) by assigning the negative of the type code to sqltype. If the type is negative then you must point at a null indicator by sqlind. The type of the null indicator must be a 2-byte integer, short_integer, or a derivative of that type.
Character data and the SQLDA have the same rules as character data in regular Embedded SQL statements. For details of character string processing in SQL, see
Ada Variables and Data Types in this chapter.