Here are fields and data types for the SQLDA data structure.
| Field | Data type | Contains |
|---|---|---|
| sqldaid | unsigned char* | Text string SQLDA. This field is not used for FETCH, OPEN, or EXECUTE statements. |
| sqldabc | long | Length of the SQLDA data structure (sqln* 44 + 16). |
| sqln | short | Total number of sqlvar entries allocated. Equal to the number of input parameters or output columns. |
| sqld | short | Number of sqlvar entries used. |
| sqlvar | struct | Values listed in the sqlvar table. The values can occur several times, listed once per column in the result set or input parameter. |
| sqltype | short | Number that represents the data type of columns or host variables, and that indicates whether null values are allowed. For information about valid values, see Valid Values for sqltype. |
| sqllen | short | External length of a value from a column. |
| sqldata | unsigned char far* | Address of the host variable (which must be inserted by the application) for FETCH, OPEN, and EXECUTE statements. For DESCRIBE and PREPARE statements, sqldata is not used. |
| sqlind | short far* | Address of an indicator variable for FETCH, OPEN, and EXECUTE statements, if one exists. If the column does not permit a null value, the field is undefined. If the column permits a null value, sqlind is set to -1 if the data value is null, or to 0 if the data value is not null. For DESCRIBE and PREPARE statements, sqlind is not used. |
| sqlname | struct | Name and length of the column (not used for FETCH, OPEN, and EXECUTE statements). |
| length | short | Length of the name column. |
| name | unsigned char* | Name of the column. For a derived column, this field contains the ASCII numeric literal value that represents the derived column’s original position within the select list. |