Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Additional DBMS error codes

A DBMS database makes full use of file store functionality and errors produced by the file store, its stream objects and the underlying file system, may be returned by many DBMS functions.

This DBMS API can also return a number of error codes which reflect certain states that the database or rowsets have encountered. Some of the APIs may also leave with these code values.

The possible error codes are summarised as follows:

KErrAccessDenied

The database cannot mix data definition and data manipulation, or combine them in a single transaction. i.e.

  • A rowset or data manipulation transaction is open on the database when attempting data definition or recovery.

  • A data definition transaction is still open when attempting to create a rowset.

  • Any incremental operation is open on the database.

KErrDied

A transaction has been aborted, because an update or commit failed. In this state the database and all associated rowsets become unusable.

In this situation, all rowsets which are currently updating or inserting a row must be cancelled, and if the transaction was begun explicitly it must be rolled back. The database will now be ready for use again.

KErrNotReady

This is returned by all rowsets following a rollback on the database. The rowset is invalid and must at least be reset and re-evaluated if necessary, but can be closed and re-opened if preferred.

KErrCorrupt

Returned when an attempt is made to use an index which has been damaged due to a rollback. Rowsets which were using such an index will fail on the first attempt to navigate their cursor. The database continues to be operational, but must be recovered to regain use of damaged indexes.

This can also be returned in the unlikely event that corruption is detected in any of the streams which make up the database. Such damage cannot have been caused by DBMS itself, and cannot be repaired.