JavaScript EditorDhtml editor     Free javascript download 



Main Page

This topic applies to the MFC ODBC classes.

The MFC CRecordset class has a new optimization (in 16-bit and 32-bit versions) that improves efficiency when you are adding new records in bulk to a table.

NoteNote

This topic applies to objects derived from CRecordset in which bulk row fetching has not been implemented. If you are using bulk row fetching, see Recordset: Fetching Records in Bulk (ODBC).

A new option for the dwOptions parameter to the CRecordset::Open member function, optimizeBulkAdd, improves performance when you are adding multiple records consecutively without calling Requery or Close. Only those fields that are dirty before the first Update call are marked as dirty for subsequent AddNew/Update calls.

If you are using the database classes to take advantage of the ::SQLSetPos ODBC API function for adding, editing, and deleting records, this optimization is unnecessary.

If the ODBC Cursor Library is loaded or the ODBC driver does not support adding, editing, and deleting through ::SQLSetPos, this optimization should improve bulk add performance. To turn on this optimization, set the dwOptions parameter in the Open call for your recordset to the following:

В CopyCode imageCopy Code
appendOnly | optimizeBulkAdd

See Also



JavaScript EditorDhtml editor     Free javascript download