The DESCRIBE statement

The sqlda structure is a dynamic-management structure that contains information about columns in dynamic SQL statements. The DESCRIBE...INTO statement uses the sqlda structure to return information about the columns in the select list of the Projection clause of a SELECT statement.

It sets the sqlvar field of an sqlda structure to point to a sequence of partially filled sqlvar_struct structures. Each structure describes a single select-list column.

Each sqlvar_struct structure contains character data for the column name and the column data. When the HCL OneDB™ ESQL/C client application fills this structure, the column name and the column data are in the client code set. When the database server fills this structure and executes a DESCRIBE...INTO statement, this character data is in the database code set.

When the client application performs code-set conversion between the client and database code sets, the number of bytes that is required to store the column name and column data in the client code set might not equal the number that is required to store this same information in the database code set. Therefore, the size of the character data in sqlvar_struct might increase or decrease during code-set conversion. To handle this possible difference in size, the client application must ensure that it correctly handles the character data in the sqlvar_struct structure.