SQLSetPos

The SQLSetPos function is much faster for performing insertion, deletion, or update operations than completing the same operation with an SQL statement. One reason is that there is no SQL statement to parse. Another reason is that the catalog need be checked just once for multiple calls to SQLSetPos, whereas the catalog is checked each time an SQL statement is executed.

The Cursor Library can also provide static updatable cursors. Desktop Database Drivers 1.0 required the Cursor Library for scrollable cursor support, but later drivers use the native scrollable cursors in Microsoft Jet. Because the Cursor Library incurs a lot of overhead, it is much slower to do a positioned update than to use SQLSetPos with an fOption argument of SQL_UPDATE. The Cursor Library must parse the SELECT statement it uses to generate the data in its cache, whereas Microsoft Jet stores parsed strings. To update the data, Microsoft Jet must perform a catalog lookup to open the table that is being updated, and the Cursor Library must create a searched UPDATE statement with a WHERE clause that may have to search through all the data in the temporary file. Even then, the appropriate data may not be found, because the buffered data represents a recordset produced by a fetch, which may not accurately represent the base table. Microsoft Jet cursors can directly update the base table, which is much faster.