Export (0) Print
Expand All

ODBC Feature Enhancements

Visual Studio .NET 2003

Several important changes have been made to the MFC ODBC classes:

  • MFC now provides multithreading support for the ODBC classes. Note, however, that this is limited to the thread-safety of the ODBC components and drivers. For more information, see the article ODBC Classes and Threads.
  • The MFC ODBC classes no longer use asynchronous processing. Data access operations are now synchronous. For a list of obsolete MFC ODBC member functions, see the topic Obsolete MFC Functions.
  • Class CDatabase provides improved support for transactions. Cursor preservation after a transaction commit or rollback is no longer required for transactions to be enabled. However, you must call the new member functions GetCursorCommitBehavior and GetCursorRollbackBehavior to check the effect of transactions on open recordsets. In addition, Technical Note 68 addresses issues specific to using transactions with the Microsoft Access 7 ODBC driver.
  • CDatabase has a new member function, OpenEx, for establishing a connection to a data source. The Open member function still exists; however, OpenEx is the preferred way to connect to a data source.
  • Class CRecordset offers support for bookmarks. For more information, see the article Recordset: Bookmarks and Absolute Positions (ODBC). CRecordset uses the new CDBVariant class to store bookmark values.
  • CRecordset provides support for bulk row fetching. For more information, see the article Recordset: Fetching Records in Bulk (ODBC). For an example of how to implement bulk row fetching, see the MFC sample DBFETCH.
  • CRecordset::Open provides many new options to enhance functionality.
  • CRecordset no longer contains any pure virtual functions. This means you can create a recordset object directly from CRecordset. For an example of how to do this, see the new member function CRecordset::GetFieldValue.

See Also

Changes from MFC Versions 4.x

Show:
© 2015 Microsoft