XSQLVAR Field Descriptions (Embedded SQL Guide)

From InterBase

Go Up to Understanding the XSQLDA (Embedded SQL Guide)


The following table describes the fields that comprise the XSQLVAR structure:

Field definition Description

short sqltype

Indicates the SQL data type of parameters or select-list items; set by InterBase during PREPARE or DESCRIBE.

short sqlscale

Provides scale, specified as a negative number, for exact numeric data types (DECIMAL, NUMERIC); set by InterBase during PREPARE or DESCRIBE.

short sqlprecision

Provides precision for the exact numeric data types (DECIMAL, NUMERIC); set by InterBase during PREPARE or DESCRIBE.

short sqlsubtype

Specifies the subtype for Blob data; set by InterBase during PREPARE or DESCRIBE.

short sqllen

Indicates the maximum size, in bytes, of data in the <sqldata> field; set by InterBase during PREPARE or DESCRIBE.

char *sqldata

For input descriptors, specifies either the address of a select-list item or a parameter; set by the application.

For output descriptors, contains a value for a select-list item; set by InterBase.

short *sqlind

On input, specifies the address of an indicator variable; set by an application.

On output, specifies the address of column indicator value for a select-list item following a FETCH.

A value of 0 indicates that the column is not NULL, a value of –1 indicates the column is NULL; set by InterBase.

short sqlname_length

Specifies the length, in bytes, of the data in field, <sqlname>; set by InterBase during DESCRIBE OUTPUT.

char
sqlname[METADATALENGTH]

Contains the name of the column.

Not null (\0) terminated; set by InterBase during DESCRIBE OUTPUT.

short relname_length

Specifies the length, in bytes, of the data in field, <relname>; set by InterBase during DESCRIBE OUTPUT.

char relname[METADATALENGTH]

Contains the name of the table.

Not null (\0) terminated; set by InterBase during DESCRIBE OUTPUT.

short ownname_length

Specifies the length, in bytes, of the data in field, ownname; set by InterBase during DESCRIBE OUTPUT.

char ownname[METADATALENGTH]

Contains the owner name of the table.

Not null (\0) terminated; set by InterBase during DESCRIBE OUTPUT.

short aliasname_length

Specifies the length, in bytes, of the data in field, <aliasname>; set by InterBase during DESCRIBE OUTPUT.

char
aliasname[METADATALENGTH]

Contains the alias name of the column; if no alias exists, contains the column name.

Not null (\0) terminated; set by InterBase during DESCRIBE OUTPUT.

Advance To: