Syntax
define external counter function SQLDescribeCol
( read-only SQL_handle_type StatementHandle,
value counter ColumnNumber,
modifiable stream ColumnName,
value counter BufferLength,
modifiable counter NameLength,
modifiable counter DataType,
modifiable counter ColumnSize,
modifiable counter DecimalDigits,
modifiable counter Nullable )
Purpose
Returns the result descriptor, column name, type, precision, scale, and "nullability" for one column in the result set.
Input arguments:
- StatementHandle.
- ColumnNumber. The number of the result set column. Columns are numbered in increasing column order, starting at 0. Column 0 is the bookmark column, if bookmarks are available. Otherwise, column numbers start at 1.
- BufferLength. The maximum length of ColumnName.
Output arguments:
- ColumnName. The column name. If the column is unnamed or cannot be determined, the driver returns an empty string.
- NameLength. The returned length of ColumnName.
- DataType. The SQL data type of the column. The following values are allowed:
- SQL_UNKNOWN_TYPE
- SQL_CHAR
- SQL_NUMERIC
- SQL_DECIMAL
- SQL_INTEGER
- SQL_SMALLINT
- SQL_FLOAT
- SQL_REAL
- SQL_DOUBLE
- SQL_DATETIME
- SQL_VARCHAR
- SQL_TYPE_DATE
- SQL_TYPE_TIME
- SQL_TYPE_TIMESTAMP
- ColumnSize. The size of the column on the data source. If the column size cannot be determined, the driver returns 0.
- DecimalDigits. The number of decimal digits of the column on the data source. If the number of decimal digits cannot be determined or is not applicable, the driver returns 0.
- Nullable. Indicates whether the column allows null values. The following values are allowed:
- SQL_NO_NULLS
- SQL_NULLABLE
- SQL_NULLABLE_UNKNOWN
|