Compartir a través de


Database Macros and Globals

The macros and globals listed below apply to ODBC-based database applications. They are not used with DAO-based applications.

Before 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

Calls 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

Calls AFX_ODBC_CALL.

AFX_SQL_SYNC

Calls an ODBC API function that does not return SQL_STILL_EXECUTING.

Database Globals

AfxGetHENV

Retrieves a handle to the ODBC environment currently in use by MFC. You can use this handle in direct ODBC calls.

See Also

Concepts

MFC Macros and Globals