Symbian3/SDK/Source/GUID-24A149FA-B82A-53A2-83E6-4F625D7041D7.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 7 51a74ef9ed63
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-24A149FA-B82A-53A2-83E6-4F625D7041D7" xml:lang="en"><title>Error
codes</title><shortdesc>The errors returned by DBMS functions are mostly documented with
those functions, but this document summarises some of the more common/general
errors.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>The Store database makes full use of file store functionality, and any
errors produced by <codeph>CPermanentFileStore</codeph>, its stream objects
and particularly the underlying file system may be returned by a DBMS function
where indicated. Also many of the functions require memory to be dynamically
allocated, and so can fail with <codeph>KErrNoMemory</codeph>.</p>
<p>The errors returned by DBMS functions are mostly documented with those
functions. There are a few general errors which can be returned by most of
the API to indicate certain states that the database or rowsets have encountered.</p>
<ul>
<li id="GUID-27B4049F-3F3D-5B86-89B7-33BE8FEDA6C0"><p><codeph>KErrAccessDenied</codeph> -
The database cannot mix data definition and data manipulation, or combine
them in a single transaction. i.e.</p> <ul>
<li id="GUID-838469A1-5415-53C4-A4ED-03D538AEFC54"><p>A rowset or data manipulation
transaction is open on the database when attempting data definition or recovery.</p> </li>
<li id="GUID-B29C8C26-298D-50F4-BAA5-425B46B85A89"><p> A data definition transaction
is still open when attempting to create a rowset. </p> </li>
<li id="GUID-91184D4A-1BCD-531F-914C-5756C4F08A2D"><p>Any incremental operation
is open on the database.</p> </li>
</ul> <p><codeph>KErrDied</codeph> - 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 is now ready for use
again.</p> </li>
<li id="GUID-DFD729AD-B8EC-5A4A-962D-DBCC87C4C261"><p><codeph>KErrNotReady</codeph> -
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.</p> </li>
<li id="GUID-EE40A750-1B31-5F2B-A33E-341F1DD9F2A8"><p><codeph>KErrCorrupt</codeph> -
This is 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 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.</p> <p>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.</p> </li>
</ul>
</conbody></concept>