![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Section Contents
Applications that use this class will not work correctly on a version of EPOC earlier than ER5.
Abstract: database behaviour |
|
RDbNamedDatabase |
Interface to a database identified by name. |
d32dbms.h
edbms.lib
This class provides the interface for creating and opening a database identified by name and its format.
For exclusive read/write or shared read/only access, the database is accessed on the client side through a file server session.
For shared read/write access, the database must be accessed through a DBMS server session.
TInt Create(RFs& aFs,const TDesC& aDatabase,const TDesC& aFormat=TPtrC(),CSecurityEncryptBase* aKey=0);
Use this function to create a new database using the supplied format specification. The database must not already exist, otherwise the function fails.
On successful return, the database is open for exclusive read/write access by the client.
This function initiates client-side access to the database through a file server session and does not require a connection to the DBMS server.
RFs& aFs |
A reference to a file server session through which the database is accessed. See file server for general information on the file server. |
const TDesC& aDatabase |
A reference to a descriptor containing the name of the database. |
const TDesC& aFormat |
A reference to a descriptor containing the format name of the database. The default format implies a Store database in the root stream of the named file. |
CSecurityEncryptBase* aKey |
A pointer to an encryption key (as returned , for example, from a call to CSecurityBase::NewEncryptL()); this is used to create authentication data in the database. The default value is |
TInt |
KErrNone if successful or one of the system error codes; see system error codes. |
TInt Replace(RFs& aFs,const TDesC& aDatabase,const TDesC& aFormat=TPtrC(),CSecurityEncryptBase* aKey=0);
Use this function to create a database using the supplied format specification and replace any existing database with the same name.
On successful return, the database is open for exclusive read/write access by the client.
This function initiates client-side access to the database through a file server session and does not require a connection to the DBMS server.
RFs& aFs |
A reference to a file server session through which the database is accessed. See file server for general information on the file server. |
const TDesC& aDatabase |
A reference to a descriptor containing the name of the database. |
const TDesC& aFormat |
A reference to a descriptor containing the format name of the database. The default format implies a Store database in the root stream of the named file. |
CSecurityEncryptBase* aKey |
A pointer to an encryption key (as returned , for example, from a call to CSecurityBase::NewEncryptL()); this is used to create authentication data in the database The default value is |
TInt |
KErrNone if successful or one of the system error codes; see system error codes. |
TInt Open(RFs& aFs,const TDesC& aDatabase,const TDesC& aFormat=TPtrC(),CSecurityDecryptBase* aKey=0,TAccess aMode=EReadWrite);
Use this function to open a database, using the supplied format specification, for client side access.
On successful return, the database is open for either exclusive read/write access or shared read/only access by the client, as determined by the file access mode aMode.
This function initiates client-side access to the database through a file server session and does not require a connection to the DBMS server.
RFs& aFs |
A reference to a file server session through which the database is accessed. See file server for general information on the file server. |
const TDesC& aDatabase |
A reference to a descriptor containing the name of the database. |
const TDesC& aFormat |
A reference to a descriptor containing the format name of the database. The default format implies a Store database in the root stream of the named file. |
CSecurityDecryptBase* aKey |
A pointer to a decryption key which should match the database encryption key. The default value is |
TAccess aMode |
The access mode; the default is exclusive read/write mode. |
TInt |
KErrNone if successful or one of the system error codes; see system error codes. |
TInt Open(RDbs& aDbs,const TDesC& aDatabase,const TDesC& aFormat=TPtrC(),CSecurityDecryptBase* aKey=0);
Use this function to open a database, using the supplied format specification, through a DBMS server session.
On successful return, the database can be shared by multiple threads where at least one of them needs write access.
RDbs& aDbs |
A reference to a session with the DBMS through which the database is accessed. |
const TDesC& aDatabase |
A reference to a descriptor containing the name of the database. |
const TDesC& aFormat |
A reference to a descriptor containing the format name of the database. The default format implies a Store database in the root stream of the named file. |
CSecurityDecryptBase* aKey |
A pointer to a decryption key which should match the database encryption key. The default value is |
TInt |
KErrNone if successful or one of the system error codes; see system error codes. |
This enumeration defines the required access mode when opening a database for client side access through a file server session.
The database is to be opened in exclusive read/write mode. |
|
The database is to be opened in shared read-only mode. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |