SQLColAttribute returns the descriptor information about a column in the result set.
1 2 3 4 5 6 7 | SQLRETURN SQLColAttribute(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAtrriburePtr, SQLSMALLINT BufferLength, SQLSMALLINT *StringLengthPtr, SQLPOINTER NumericAttributePtr); |
Keyword |
Description |
---|---|
StatementHandle |
Statement handle. |
ColumnNumber |
Column number of the field to be queried, starting at 1 and increasing in an ascending order. |
FieldIdentifier |
Field identifier of ColumnNumber in IRD. |
CharacterAttributePtr |
Output parameter: pointer to the buffer that returns FieldIdentifier field value. |
BufferLength |
|
StringLengthPtr |
Output parameter: pointer to a buffer in which the total number of valid bytes (for string data) is stored in *CharacterAttributePtr. Ignore the value of BufferLength if the data is not a string. |
NumericAttributePtr |
Output parameter: pointer to an integer buffer in which the value of the FieldIdentifier field in the ColumnNumber row of the IRD is returned. |
If SQLColAttribute returns SQL_ERROR or SQL_SUCCESS_WITH_INFO, the application can then call SQLGetDiagRec, set HandleType and Handle to SQL_HANDLE_STMT and StatementHandle, and obtain the SQLSTATE value. The SQLSTATE value provides the detailed function calling information.
See Examples.