The macros and globals listed below apply to ODBC-based database applications. They are not used with DAO-based applications.
Prior to MFC 4.2, the macros AFX_SQL_ASYNC and AFX_SQL_SYNC gave asynchronous operations an opportunity to yield time to other processes. Beginning with MFC 4.2, the implementation of these macros changed because the MFC ODBC classes used only synchronous operations. The macro AFX_ODBC_CALL was new to MFC 4.2.
Database Macros
AFX_ODBC_CALL | Use this macro to call an ODBC API function that returns SQL_STILL_EXECUTING. AFX_ODBC_CALL will repeatedly call the function until it no longer returns SQL_STILL_EXECUTING. |
AFX_SQL_ASYNC | Simply calls AFX_ODBC_CALL. |
AFX_SQL_SYNC | Use this macro to calls an ODBC API function that does not return SQL_STILL_EXECUTING. |
Database Globals
AfxGetHENV | Use this global to retrieve a handle to the ODBC environment currently in use by MFC. You can use this handle in direct ODBC calls. |