
|   |  | |
Location: 
            D32DBMS.H
            
Link against: edbms.lib
            
         
class RDbNamedDatabase : public RDbDatabase;
Generic database implementation
RDbDatabase - Abstract class providing the functionality of a database
            RDbNamedDatabase - Generic database implementation
            Defined in RDbNamedDatabase:
            Create(), Create(), EReadOnly, EReadWrite, Open(), Open(), Replace(), TAccess
            
         
Inherited from RDbDatabase:
            AlterTable(),
            Begin(),
            Close(),
            ColSetL(),
            Commit(),
            Compact(),
            CreateIndex(),
            CreateTable(),
            Destroy(),
            DropIndex(),
            DropTable(),
            Execute(),
            InTransaction(),
            IndexNamesL(),
            IsDamaged(),
            KeyL(),
            Recover(),
            Rollback(),
            Size(),
            TSize,
            TableNamesL(),
            UpdateStats(),
            iDatabase
| Capability: | Security policy note: | For a secure shared database, the caller must satisfy the schema access policy for the database. | 
IMPORT_C TInt Create(RDbs &aDbs, const TDesC &aDatabase, const TDesC &aFormat);
Creates a secure shared database. Max allowed database name length (with the extension) is KDbMaxName symbols.
In this "client-server" mode the database can be shared with the other clients.
For creating a non-secure database, see RDbNamedDatabase::Create(), which first argument is a RFs reference (or RDbNamedDatabase::Replace()).
         
| 
 | 
| 
 | 
IMPORT_C TInt Create(RFs &aFs, const TDesC &aDatabase, const TDesC &aFormat=TPtrC());
Creates a new non-secure database.
In this "single client" mode, the database cannot be shared with the other clients. The database server is not involved in the operations with the database, the client side database library (edbms.dll) will be used. If the database has to be shared, the following example shows how this may be accomplished:
RFs fs;
TInt err = fs.Connect();
<process the error>
_LIT(KDatabaseName, _L("C:\\A.DB"));
RDbNamedDatabase db;
err = db.Create(fs, KDatabaseName);      //Step 1 - create the database using the RFs object
<process the error>
db.Close();                             //Step 2 - close the database
RDbs dbs;
err = dbs.Connect();
<process the error>
err = db.Open(dbs, KDatabaseName);       //Step 3 - reopen the database using the RDbs object
<process the error>
...
Max allowed database name length (with the extension) is KDbMaxName symbols.
For creating a new secure shared database, see RDbNamedDatabase::Create(), which first argument is a RDbs reference.
         
| 
 | 
| 
 | 
IMPORT_C TInt Replace(RFs &aFs, const TDesC &aDatabase, const TDesC &aFormat=TPtrC());
Creates a new non-secure database. If a database with the same file name exists, it will be replased.
In this "single client" mode, the database cannot be shared with the other clients. The database server is not involved in the operations with the database, the client side database library (edbms.dll) will be used. If the database has to be shared, the following example shows how this may be accomplished:
RFs fs;
TInt err = fs.Connect();
<process the error>
_LIT(KDatabaseName, _L("C:\\A.DB"));
RDbNamedDatabase db;
err = db.Replace(fs, KDatabaseName); //Step 1 - create the database using the RFs object
<process the error>
db.Close();                             //Step 2 - close the database
RDbs dbs;
err = dbs.Connect();
<process the error>
err = db.Open(dbs, KDatabaseName);       //Step 3 - reopen the database using the RDbs object
<process the error>
...
Max allowed database name length (with the extension) is KDbMaxName symbols.
For creating a new secure shared database, see RDbNamedDatabase::Create(), which first argument is a RDbs reference.
         
| 
 | 
| 
 | 
IMPORT_C TInt Open(RFs &aFs, const TDesC &aDatabase, const TDesC &aFormat=TPtrC(), TAccess aMode=EReadWrite);
Opens an existing non-secure database.
In this "single client" mode, the database cannot be shared with the other clients. The database server is not involved in the operations with the database, the client side database library (edbms.dll) will be used.
For opening a new secure shared database, see RDbNamedDatabase::Open(), which first argument is a RDbs reference.
         
| 
 | 
| 
 | 
| Capability: | Security policy note: | For a secure shared database, the caller must satisfy the read, the write or the schema access policy for the database. | 
IMPORT_C TInt Open(RDbs &aDbs, const TDesC &aDatabase, const TDesC &aFormat=TPtrC());
Opens an existing shared secure or non-secure database. Max allowed database name length (with the extension) is KDbMaxName symbols.
In this "client-server" mode the database can be shared with the other clients.
For opening a single, non-shareable connection to the database, see RDbNamedDatabase::Open(), which first argument is a RFs reference.
         
| 
 | 
| 
 | 
TAccess
Specifies which operations can be performed on a rowset.
| 
 |