CRecordset::Check

virtual BOOL Check( RETCODE nRetCode ) const;

Return Value

Nonzero if the value of nRetCode is SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_NO_DATA_FOUND or SQL_NEED_DATA; otherwise 0.

Parameters

nRetCode

An ODBC API function return code. For details, see Remarks.

Remarks

Call this member function to examine the return code from an ODBC API function. The following table lists the possible values for nRetCode.

nRetCode Description
SQL_SUCCESS Function completed successfully; no additional information is available.
SQL_SUCCESS_WITH_INFO Function completed successfully, possibly with a nonfatal error. Additional information can be obtained by calling SQLError.
SQL_NO_DATA_FOUND All rows from the result set have been fetched.
SQL_ERROR Function failed. Additional information can be obtained by calling SQLError.
SQL_INVALID_HANDLE Function failed due to an invalid environment handle, connection handle, or statement handle. This indicates a programming error. No additional information is available from SQLError.
SQL_STILL_EXECUTING A function that was started asynchronously is still executing. Note that by default, MFC will never pass this value to Check because MFC uses only synchronous processing.
SQL_NEED_DATA While processing a statement, the driver determined that the application needs to send parameter data values.

For more information about SQLError, see the ODBC SDK Programmer's Reference.

Example

See the macro AFX_ODBC_CALL.

CRecordset OverviewClass MembersHierarchy Chart

See Also   AFX_ODBC_CALL