![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Section Contents
These members of the class are new in EPOC Release 5. They offer new functionality for:
See RDbDatabase for the pre-ER5 documentation for this class.
TInt Begin();
Use this function to begin a transaction on the database. Transactions cannot be nested, so this must not be called if a transaction is outstanding including automatic transactions.
If transactions are not begun explicitly using Begin(), any modifications to the database will be made within an automatic transaction.
Beginning a transaction locks the database; the lock is a shared read-lock. In ER5, this can fail if another client already has a lock which excludes this client; the function returns an error code to indicate this.
The function always returns KErrNone for client side access to the database and this ensures binary compatibility with the pre-ER5 version.
TInt |
KErrNone for client side access to the database or, if this is a shared database and the client has successfully locked it. KErrLocked if this is a shared database and another client already has an exclusive write-lock on it. otherwise, one of the system error codes; see system error codes. |
If the client has already locked the database, then another attempt to lock it causes the client to be panicked.
TSize Size() const;
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Use this function to return the currently available size information for the database.
Specifically, the information returned is:
TSize |
Size information for the database. |
TInt UpdateStats();
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Use this function to update any calculated statistics for the database and return when the update operation is complete.
This function can take an extended time to complete; an incremental form is provided by the RDbIncremental class.
TInt |
KErrNone or one of the system error codes; see system error codes. |
TInt Compact();
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Use this function to compact the database and return when the compact operation is complete.
This function can take an extended time to complete; an incremental form is provided by the RDbIncremental class.
TInt |
KErrNone or one of the system error codes; see system error codes. |
TInt Execute(const TDesC& aSql,TDbTextComparison aComparison=EDbCompareNormal);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Use this function to execute a DDL (SQL schema update) statement or a DML (SQL data update) statement on the database and return when complete.
This function can take an extended time to complete; an incremental form is provided by the RDbIncremental class.
const TDesC& aSql |
A reference to a descriptor containing the SQL statement to be executed on the database |
TDbTextComparison aComparison |
This argument is used in the execution of some SQL statements; specifically:
All other SQL statements ignore this argument. If not explicitly specified, this argument defaults to EDbCompareNormal. |
TInt |
Either:
or
or
|
The struct is a data type that is returned by the Size() member function of this class.
The total size of database objects, in bytes. |
|
The proportion, as a percentage, of the total size of database objects which is live data. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |