diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-EFA822E0-BE80-5EB8-82E5-1659BDB1BDD9.dita --- a/Symbian3/PDK/Source/GUID-EFA822E0-BE80-5EB8-82E5-1659BDB1BDD9.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-EFA822E0-BE80-5EB8-82E5-1659BDB1BDD9.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,20 +1,45 @@ - - - - - -Named database

In order to support the DBMS client-server interface, the RDbNamedDatabase class provides the interface for creating and opening databases identified by name.

The mechanism is generic; the database is identified by its name and the database format. The format is a name that is used to identify the implementation used for creating or opening that database. There is a default format, which has the name "epoc". The default format is a store database in the root stream of the database file.

If required, other formats can be provided in extension DBMS driver libraries. These formats need no be file-based. Additional DBMS driver libraries are dynamically bound to the API at run-time, if one can be found to support the format requested.

Formats which are UidTyped files, such as the default, can allow the client to specify a 3rd Uid by extending the format name with the Uid name (as generated by the Name() member function of TUid, an 8 digit hexadecimal number enclosed in square brackets).

If specified, this is also checked when a database is opened. e.g. creating a FileStore database “C:\My Database” with a 3rd Uid of 0x10001234:

_LIT(KMydatabase,"C:\\My Database"); -_LIT(KDemoUid,"[10001234]"); -RDbNamedDatabase database; -TInt r=database.Create(fs,KMydatabase,KDemoUid);

For comparison, the equivalent code required to create an RDbStoreDatabase in the root of a CPermanentFileStore would have been:

_LIT(KMydatabase,"C:\\My Database"); -CFileStore* fstore=CPermanentFileStore::ReplaceLC(fs,KMydatabase,EFileWrite); -fstore->SetTypeL(TUidType(fstore->Layout(),KDatabaseUid,TUid::Uid(0x10001234))); -RDbStoreDatabase database; -fstore->SetRootL(database.CreateL(fstore)); -fstore->CommitL();

A named database may be encrypted; the default is an un-encrypted database.

\ No newline at end of file + + + + + +Named +databaseDescribes how databases can be created and opened using the database +name. +

In order to support the DBMS client-server interface, the RDbNamedDatabase class +provides the interface for creating and opening databases identified by name.

+

The mechanism is generic; the database is identified by its name and the +database format. The format is a name that is used to identify the implementation +used for creating or opening that database. There is a default format, which +has the name "epoc". The default format is a store database in the root stream +of the database file.

+

If required, other formats can be provided in extension DBMS driver libraries. +These formats need no be file-based. Additional DBMS driver libraries are +dynamically bound to the API at run-time, if one can be found to support the +format requested.

+

Formats which are UidTyped files, such as the default, can allow the client +to specify a 3rd Uid by extending the format name with the Uid name (as generated +by the Name() member function of TUid, an +8 digit hexadecimal number enclosed in square brackets).

+

If specified, this is also checked when a database is opened. e.g. creating +a FileStore database “C:\My Database” with a 3rd Uid of 0x10001234:

+_LIT(KMydatabase,"C:\\My Database"); +_LIT(KDemoUid,"[10001234]"); +RDbNamedDatabase database; +TInt r=database.Create(fs,KMydatabase,KDemoUid); +

For comparison, the equivalent code required to create an RDbStoreDatabase in +the root of a CPermanentFileStore would have been:

+_LIT(KMydatabase,"C:\\My Database"); +CFileStore* fstore=CPermanentFileStore::ReplaceLC(fs,KMydatabase,EFileWrite); +fstore->SetTypeL(TUidType(fstore->Layout(),KDatabaseUid,TUid::Uid(0x10001234))); +RDbStoreDatabase database; +fstore->SetRootL(database.CreateL(fstore)); +fstore->CommitL(); +

A named database may be encrypted; the default is an un-encrypted database.

+
\ No newline at end of file