MDAC 2.5 SDK - ODBC Programmer's Reference
Appendix F: ODBC Cursor Library
An application allocates one or more buffers for the cursor library to return the current rowset in. It calls SQLBindCol one or more times to bind these buffers to the result set.
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.x 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.x driver, the cursor library allows the buffer to be any size.