SQLColAttributes (core level only)

SQLColAttributes returns descriptor information for a column in a result set.

It cannot be used to return information about the bookmark column (column 0). Descriptor information is returned as a character string, a 32-bit descriptor-dependent value, or an integer value.

The following table describes the SQLSTATE and error values for SQLColAttributes.
SQLSTATE Error value Error message
01000 -11001 General warning
01004 -11003 Data truncated
24000 -11031 Invalid cursor state
S1000 -11060 General error
S1001 -11061 Memory-allocation failure
S1002 -11062 Invalid column number
S1008 -11065 Operation canceled
S1010 -11067 Function-sequence error
S1090 -11071 Invalid string or buffer length
S1091 -11072 Descriptor type out of range
S1C00 -11092 Driver not capable
S1T00 -11094 Time-out expired

SQLColAttributes can return any SQLSTATE that can be returned by SQLPrepare or SQLExecute when it is called after SQLPrepare and before SQLExecute, depending on when the data source evaluates the SQL statement associated with the hstmt.