Syntax
define external counter function SQLColAttribute
( read-only SQL_handle_type StatementHandle,
value counter ColumnNumber,
value counter FieldIdentifier,
modifiable stream CharacterAttribute,
value counter BufferLength,
modifiable counter StringLength,
modifiable counter NumericAttribute )
Purpose
Returns descriptor information for a column in a result set. Descriptor information is returned as a character string, a 32-bit descriptor-dependent value, or an integer value.
Input arguments:
- StatementHandle.
- ColumnNumber. The column number of the result data, starting at 1. Columns can be described in any order. Column 0 can be specified, but all values except SQL_DESC_TYPE and SQL_DESC_OCTET_LENGTH will return undefined values.
- FieldIdentifier. The number of the field to be returned. The following values are allowed:
- SQL_DESC_COUNT
- SQL_DESC_TYPE
- SQL_DESC_LENGTH
- SQL_DESC_OCTET_LENGTH_PTR
- SQL_DESC_PRECISION
- SQL_DESC_SCALE
- SQL_DESC_DATETIME_INTERVAL_CODE
- SQL_DESC_NULLABLE
- SQL_DESC_INDICATOR_PTR
- SQL_DESC_DATA_PTR
- SQL_DESC_NAME
- SQL_DESC_UNNAMED
- SQL_DESC_OCTET_LENGTH
- SQL_DESC_ALLOC_TYPE
- SQL_DESC_ARRAY_SIZE
- SQL_DESC_ARRAY_STATUS_PTR
- SQL_DESC_BASE_COLUMN_NAME
- SQL_DESC_BASE_TABLE_NAME
- SQL_DESC_BIND_OFFSET_PTR
- SQL_DESC_BIND_TYPE
- SQL_DESC_DATETIME_INTERVAL_PRECISION
- SQL_DESC_LITERAL_PREFIX
- SQL_DESC_LITERAL_SUFFIX
- SQL_DESC_LOCAL_TYPE_NAME
- SQL_DESC_MAXIMUM_SCALE
- SQL_DESC_MINIMUM_SCALE
- SQL_DESC_NUM_PREC_RADIX
- SQL_DESC_PARAMETER_TYPE
- SQL_DESC_ROWS_PROCESSED_PTR
- BufferLength. The length of the data buffer, in bytes.
Output arguments:
- CharacterAttribute. The value in the FieldIdentifier field, if it is character data.
- StringLength. The number of bytes returned in CharacterAttribute.
- NumericAttribute. The value in the FieldIdentifier field, if it is numeric data.
|