This documentation is archived and is not being maintained.


Called to handle errors generated during record fetching.

virtual void CheckRowsetError( 
   RETCODE nRetCode  



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

This virtual member function handles errors that occur when records are fetched, and is useful during bulk row fetching. You may want to consider overriding CheckRowsetError to implement your own error handling.

CheckRowsetError is called automatically in a cursor navigation operation, such as Open, Requery, or any Move operation. It is passed the return value of the ODBC API function SQLExtendedFetch. The following table lists the possible values for the nRetCode parameter.

nRetCode Description


Function completed successfully; no additional information is available.


Function completed successfully, possibly with a nonfatal error. Additional information can be obtained by calling SQLError.


All rows from the result set have been fetched.


Function failed. Additional information can be obtained by calling SQLError.


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.


A function that was started asynchronously is still executing. Note that by default, MFC will never pass this value to CheckRowsetError; MFC will continue calling SQLExtendedFetch until it no longer returns SQL_STILL_EXECUTING.

For more information about SQLError, see the Platform SDK. For more information about bulk row fetching, see the article Recordset: Fetching Records in Bulk (ODBC).

This method can throw exceptions of type CDBException*.