×
Namespaces

Variants
Actions
Revision as of 09:59, 15 June 2012 by hamishwillee (Talk | contribs)

Archived:CContactDatabase problem in some S60 3rd Edition, FP2 devices (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

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
Devices(s): Tested on Nokia 6210 Navigator, Nokia N96
Compatibility
Platform(s): S60 3rd Edition FP2, S60 5th Edition
S60 3rd Edition FP2
Article
Keywords: CContactDatabase::CloseTables()
Created: User:Technical writer 1 (17 Dec 2008)
Last edited: hamishwillee (15 Jun 2012)

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.

58 page views in the last 30 days.
×