Bookmark Types
An application can call SQLColAttribute with the FieldIdentifier argument set to SQL_DESC_OCTET_LENGTH to obtain the length of the bookmark.
Because a variable-length bookmark can be a long value, an application should
not bind to column 0 unless it will use the bookmark for many of the rows in the
rowset.
Fixed-length bookmarks are supported only for backward compatibility. If an
ODBC 2.x application working with an ODBC 3.0 driver calls SQLSetStmtOption to set SQL_USE_BOOKMARKS to SQL_UB_ON, it is mapped in the Driver Manager to
SQL_UB_VARIABLE. A variable-length bookmark is used, even if only 32 bits of it
are populated. If a driver supports fixed-length bookmarks, it will support
variable-length bookmarks. If an ODBC 3.0 application working with an ODBC 2.x driver calls SQLSetStmtAttr to set SQL_ATTR_USE_BOOKMARKS to SQL_UB_VARIABLE, it is mapped in the Driver
Manager to SQL_UB_ON, and a 32-bit fixed-length bookmark is used. The
SQL_ATTR_FETCH_BOOKMARK_PTR statement attribute must then point to a 32-bit bookmark. If
the bookmarks used are longer than 32-bits, such as when primary keys are used
as bookmarks, the cursor must map the actual values to 32-bit values. It
could, for example, build a hash table of them.