Download Informix CLI Programmer`s Manual, Version 2.5

Transcript
SQLDescribeCol
SQLDescribeCol
Core
SQLDescribeCol returns the result descriptor (column name, type, precision,
scale, and nullability) for one column in the result set; it cannot be used to
return information about the bookmark column (column 0).
Syntax
RETCODE SQLDescribeCol(hstmt, icol, szColName, cbColNameMax,
pcbColName, pfSqlType, pcbColDef, pibScale, pfNullable)
The SQLDescribeCol function accepts the following arguments.
Type
Argument
Use
Description
HSTMT
hstmt
Input
Statement handle.
UWORD
icol
Input
Column number of result data,
ordered sequentially left to right,
starting at 1.
UCHAR FAR *
szColName
Output
Pointer to storage for the column
name. If the column is unnamed
or the column name cannot be
determined, the driver returns
an empty string.
SWORD
cbColNameMax
Input
Maximum length of the
szColName buffer.
SWORD FAR *
pcbColName
Output
Total number of bytes (excluding
the null-termination byte)
available to return in szColName.
If the number of bytes available
to return is greater than or equal
to cbColNameMax, the column
name in szColName is truncated
to cbColNameMax – 1 bytes.
(1 of 3)
INFORMIX-CLI Function Reference 13-85