SQLDescribeCol (core level only)
SQLDescribeCol returns the result descriptor (column name, type, precision, scale, and whether it can have a NULL value) for one column in the result set.
It cannot be used to return information about the bookmark column (column 0).
The following table describes the SQLSTATE
and error values for SQLDescribeCol.
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 |
S1T00 | -11094 | Time-out expired |
SQLDescribeCol can return any SQLSTATE that SQLPrepare or SQLExecute returns when SQLDescribeCol is called after SQLPrepare and before SQLExecute, depending on when the data source evaluates the SQL statement associated with the hstmt.