Udostępnij za pośrednictwem


DBROWSTATUS Enumerated Type

Providers use DBROWSTATUS values to return information about the status of a row and whether an operation succeeds or fails for each row in the rowset.

The values of DBROWSTATUS have the following meanings.

Value

Description

DBROWSTATUS_S_OK

The operation upon the row succeeded.

DBROWSTATUS_S_MULTIPLECHANGES

Occurs when updating or deleting a single row caused more than one row to be updated or deleted in the data store. For more information, see DBPROP_REPORTMULTIPLECHANGES.

DBROWSTATUS_S_PENDINGCHANGES

Can occur after a consumer has called IRowset::ReleaseRows, and the row had a pending change. The row will be released, and the corresponding element of rgRowStatus will contain this value.

DBROWSTATUS_S_ROWSETCOLUMN

IRowSchemaChange::DeleteColumns may return this row status when asked to delete a rowset column from a row. The value is actually nulled, but the column remains in the row and rowset.

DBROWSTATUS_S_NOCHANGE

Occurs when an operation succeeds for a row but no changes were made. IRowSetRefresh::RefreshVisibleData often returns this row status as a status flag to indicate that the row has not changed.

DBROWSTATUS_E_CANCELED

Operation on a row was canceled during notification. The row operation was not completed, and the corresponding row status contains this value.

DBROWSTATUS_E_CANTRELEASE

The operation upon the row failed because the row could not be released.

DBROWSTATUS_E_CONCURRENCYVIOLATION

The row was not updated because someone else already updated the row. Presumably, the data from the first update conflicts with the data that was part of the second concurrently attempted update.

DBROWSTATUS_E_DELETED

The row has already been deleted at the server. This indicates an error and that the requested operation failed. Under these circumstances, the status for the corresponding row contains this value.

DBROWSTATUS_E_PENDINGINSERT

This can occur when the rowset is in deferred update mode, which occurs when you insert or create a new row in the client application but the change has not yet been transmitted to the server.

For example, if the consumer inserts a new row, and then tries to resynchronize with the data source, the newly inserted row was not yet transmitted to data source, so the requested operation failed.

Another example would be where IRowsetRefresh:RefreshVisibleData is called with fOverwrite set to False. In that case, the server can't overwrite the newly inserted row, so the provider returns an error.

DBROWSTATUS_E_NEWLYINSERTED

If the DBPROP_CHANGEINSERTEDROWS is set to false and consumer calls IRowsetChange::DeleteRows or IRowsetChange::SetData for newly inserted rows, DeleteRows returns a status of DBROWSTATUS_E_NEWLYINSERTED for the row and SetData returns DB_E_NEWLYINSERTED.

DBROWSTATUS_E_INTEGRITYVIOLATION

Occurs when the provider recognizes that deleting a referred row violates the integrity constraints for the column or table.

DBROWSTATUS_E_INVALID

Row handle or bookmark was invalid. Operation for the row failed. This can happen because either the consumer used a row handle or bookmark that was not valid or it might have referred to a row that the current thread does not have access to. Under these circumstances, the status for the corresponding row contains this value.

DBROWSTATUS_E_MAXPENDCHANGESEXCEEDED

The operation upon the row failed because the maximum number of pending changes was exceeded.

DBROWSTATUS_E_OBJECTOPEN

Consumer referred to a row on which a storage object was open, and the operation is not allowed until storage object is released. For example, when rowset is in deferred update mode, the consumer cannot undo any pending changes made through storage object that is still open.

DBROWSTATUS_E_OUTOFMEMORY

The rowset ran out of memory and was unable to perform operation for the row.

DBROWSTATUS_E_PERMISSIONDENIED

The consumer did not have sufficient permission to perform operation for the row.

DBROWSTATUS_E_LIMITREACHED

The row was not fetched for the following reason: Fetching rows required further execution of the command, such as when the rowset uses a server-side cursor. Execution has been stopped and cannot be resumed because a resource limit has been reached. Under these circumstances, the status for the corresponding row contains this value.

DBROWSTATUS_E_SCHEMAVIOLATION

The operation upon the row failed because of a schema violation. This row status indicates an error and that the data in the row would conflict with the requirements imposed by the database schema.

DBROWSTATUS_E_FAIL

The consumer encountered a recoverable, provider-specific error, such as an RPC failure when transmitting the change to a remote server. Under these circumstances, the status for the corresponding row contains this value.