Archived:CContactDatabase problem in some S60 3rd Edition, FP2 devices (Known Issue)
hamishwillee
(Talk | contribs) m (Hamishwillee - Bot update) |
hamishwillee
(Talk | contribs) m (moved CContactDatabase problem in some S60 3rd Edition, FP2 devices (Known Issue) to Archived:CContactDatabase problem in some S60 3rd Edition, FP2 devices (Known Issue)) |
Latest revision as of 09:59, 15 June 2012
If the Contacts application is open in the background, accessing the contact database from a 3rd party application at the same time may cause problems when switching back to the built-in application and trying to view contacts.
Article Metadata
Tested with
Compatibility
Article
Description
With the Contacts application running in the background, executing the following code may cause some problems:
// Open the default contact database
CContactDatabase * pDb = CContactDatabase::OpenL();
pDb->CloseTables();
delete pDb;
When switching back to the Contacts application, the following message is displayed: No contacts. Contacts from selected memories not available.
How to reproduce
This is easy to reproduce with the S60CppExamples\Contacts example application available in the SDK. Open Contacts in the main view, start the example application, select Options > Open > Default database, exit from the example application, and switch back to Contacts.
Solution
Do not call CContactDatabase::CloseTables().
CloseTables() is a legacy function from the old contacts model architecture, and should no longer be used when closing the contacts model - it is sufficient to delete the CContactDatabase object.

