Previous Topic: Data Type of the ColumnNext Topic: SQLDA (EXECUTE, FETCH, or OPEN Statement)


SQLVAR and SQLTYPE

Before you can use the SQLDA in an EXECUTE, FETCH, or OPEN statement, the SQLDATA field must be loaded with the address of the host-variable that is to receive data (for that column), while the SQLIND field must be loaded (if applicable) with the address of an indicator variable.

Field

Field

Value Expected or Returned

SQLVAR

SQLDATA

A value of -1 indicates FOR BIT DATA.

SQLVAR

SQLIND

Reserved.

SQLVAR

SQLNAME-VARCHAR

A varying-length string (VARCHAR(30)) which contains the unqualified name of the column, or the label of the column, depending on the value of USING (NAMES, LABELS, ANY, or BOTH). Also, a string of length 0 if a column name is to be used but no column name exists (for example, the column of the result table is an expression).