SQLBindCol (core level only)
SQLBindCol assigns the storage and Informix® ODBC Driver C data type for a column in a result set.
The SQLBindCol assigns the storage
as follows:
- A storage buffer that receives the contents of a column of data
- The length of the storage buffer
- A storage location that receives the actual length of the column of data returned by the fetch operation
- Data type conversion from the Informix® SQL data type to the Informix® ODBC driver C data type
The following table describes the SQLSTATE and error values
for SQLBindCol.
SQLSTATE | Error value | Error message |
---|---|---|
01000 | -11001 | General warning |
S1000 | -11060 | General error |
S1001 | -11061 | Memory-allocation failure |
S1002 | -11062 | Invalid column number |
S1003 | -11063 | Program type out of range |
S1010 | -11067 | Function-sequence error |
S1090 | -11071 | Invalid string or buffer length |
S1C00 | -11092 | Driver not capable |
Important: An application can call SQLBindCol
to bind a column to a new storage location, regardless of whether
data has already been fetched. The new binding replaces the old binding
for bookmark columns as well as other bound columns. The new binding
does not apply to data already fetched; it takes effect the next time SQLFetch, SQLExtendedFetch,
or SQLSetPos is called.