Arrays of Errors

A number of methods operate on multiple items or arrays of items. For example, IRowsetLocate::GetRowsByBookmark accepts an array of bookmarks and retrieves the rows associated with those bookmarks. When methods that operate on multiple items encounter an item-level error, such as when the row associated with a bookmark has been deleted, they flag that error and continue processing. They then return the code DB_S_ERRORSOCCURRED if at least one item was processed successfully, or the code DB_E_ERRORSOCCURRED if no items were processed successfully.

If the consumer requests it, these methods also return an array of DBROWSTATUS values, which detail the specific errors and warnings that occurred. The array is returned if the method returns a success code (such as S_OK), a warning code (such as DB_S_ERRORSOCCURRED), or the error code DB_E_ERRORSOCCURRED; it is not returned if the method returns any other error (E_ or DB_E_) code. DB_S_ERRORSOCCURRED is returned only if an error occurred. If only successes or warnings occurred, the method returns a success code or a warning code other than DB_S_ERRORSOCCURRED.

DBROWSTATUS Values

Condition Results of the Row Operation Exceptions
The DBROWSTATUS value includes the characters "_S_" Successful, but the status is a warning that something else occurred DBROWSTATUS_S_OK simply indicates success
The DBROWSTATUS value includes the characters "_E_" Failed None

DBROWSTATUS values are defined as follows. For information about the conditions under which each is returned, see the methods that return them.

Note   Consumers should be prepared to handle DBROWSTATUS values outside of those defined in the specification.