SQLBindCol in the Cursor Library
An application can call SQLBindCol to rebind result set columns after it has called SQLExtendedFetch, SQLFetch, or SQLFetchScroll, as long as the C data type, column size, and decimal digits of the bound
column remain the same. The application need not close the cursor to rebind
columns to different addresses.
The cursor library supports setting the SQL_ATTR_ROW_BIND_OFFSET_PTR statement
attribute to use bind offsets. (SQLBindCol does not have to be called for this rebinding to occur.) If the cursor
library is used with an ODBC 3.0 driver, the bind offset is not used when SQLFetch is called. The bind offset is used if SQLFetch is called when the cursor library is used with an ODBC 2.x driver, because SQLFetch is then mapped to SQLExtendedFetch.
The cursor library supports calling SQLBindCol to bind the bookmark column.
When working with an ODBC 2.x driver, the cursor library returns SQLSTATE HY090 (Invalid string or buffer
length) when SQLBindCol is called to set the buffer length for a bookmark column to a value not equal
to 4. When working with an ODBC 3.0 driver, the cursor library allows the
buffer to be any size.