Scrollable Cursor Support

Desktop Database Drivers 1.0 supported scrollable cursors through the ODBC Cursor Library. The Cursor Library implements the ODBC function SQLExtendedFetch by repeatedly calling SQLFetch to populate the Cursor Library cache one record (row) at a time. Scrolling is emulated when the application calls SQLExtendedFetch to reposition the cursor on data in the cache. Data is re-fetched from the driver only when necessary. Because the Cursor Library supports only static cursors, it cannot detect changes in the underlying data source.

With version 2.0 and later drivers, the Cursor Library is no longer necessary. The Desktop Database Drivers directly support SQLExtendedFetch and SQLSetPos through native Microsoft Jet cursors, which are much more efficient than the Cursor Library. While the Cursor Library can still be used, its use is discouraged. The Cursor Library incurs a lot of overhead in parsing the SELECT statement it uses to generate the data in its cache, performing a catalog lookup to update data, and creating a searched UPDATE statement with a WHERE clause to update the base table based on data in the temporary file. Microsoft Jet cursors perform direct updates, operating on the base table, that are much faster. For more information, see the Insertion, Deletion, and Update Performance ” section later in this chapter.