AFX_SQL_SYNC
TRY
TOC
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

AFX_SQL_SYNC

The AFX_SQL_SYNC macro simply calls the function SQLFunc.

AFX_SQL_SYNC(SQLFunc )

SQLFunc

An ODBC API function. For more information about these functions, see the Windows SDK.

Use this macro to call ODBC API functions that will not return SQL_STILL_EXECUTING.

Before calling AFX_SQL_SYNC, you must declare a variable, nRetCode, of type RETCODE. You can check the value of nRetCode after the macro call.

Note that the implementation of AFX_SQL_SYNC changed in MFC 4.2. Because checking the server status was no longer required, AFX_SQL_SYNC simply assigns a value to nRetCode. For example, instead of making the call

AFX_SQL_SYNC(::SQLGetInfo(m_dbCust.m_hdbc, SQL_ODBC_SQL_CONFORMANCE,
   &nValue, sizeof(nValue), &cbValue));

you can simply make the assignment

nRetCode = ::SQLGetInfo(m_dbCust.m_hdbc, SQL_ODBC_SQL_CONFORMANCE,
   &nValue, sizeof(nValue), &cbValue);

Header: afxdb.h

Show:
© 2016 Microsoft