SQLVAR

typedef struct sqlvar

{

int sqltype;

int sqllen;

int reserved;

short internal;

short sqlindlen;

int sqlindtype;

SAGPointer sqlind;

SAGPointer sqldata;

SAGColumn sqlname;

}

SQLVAR;

 

SQLVAR is a structure declared within an SQLDA (input or output) describing each column of a result row.

Each occurrence of SQLVAR describes one column of the result row being transferred to the client application.

An SQLVAR occurrence consists of nine fields:

 

SQLVAR Variable

Description

sqltype

4 byte integer field containing the data-type of the variable being used for data transfer for the column, and whether NULL values are supported.

sqllen

4 byte integer field containing the length (or precision and scale for DECIMAL and NUMERIC types) of the variable being used for data transfer for the column.

Please see following section 'Decoding and Encoding SQLLEN' for more information regarding the usage of this field.

reserved

4 byte integer field. Reserved for internal use.

internal

2 byte integer field. Reserved for internal use.

sqlindlen

2 byte integer field containing the length of the variable being used as the column indicator.

sqlindtype

4 byte integer field containing the data-type of the variable being used as the column indicator.

sqlind

8 byte pointer structure of type SAGPointer containing the address of an indicator.

sqldata

8 byte pointer structure of type SAGPointer containing the address of the of the variable being used for data transfer.

sqlname

140 byte aggregate structure of type SAGColumn containing the length, type and name of the column within the Catalog.