Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Contacts.cdb

1 replies · 4,395 views · Started 05 May 2004

Hi
I use the following code to try and open the contacts DB and count the number of contancts .
the file path is correct but:
1) the number I receive is 48 which I understand is actually 0 ( when usinf %f it is 0.00) .
2) in the file contacts.db properties there is no change in the last accessed time.

any idea why it doesn't work ??? 😞


TFileName contactDbFilePath;
CContactDatabase* newDefaultContactDb;
User::InfoPrint(contactDbFilePath);
CContactDatabase * contactDb = CContactDatabase::OpenL(contactDbFilePath);
RDebug::Print(_L( "number of contacts : %d", contactDb.CountL()))

I am also trying to open the data base but it doesn't work : i use :

// open a record store with the given filename
db = RecordStore.openRecordStore("C:\\System\\Data\\Contacts.cdb",true);
RecordEnumeration re = db.enumerateRecords(null, null, true);
RecordEnumeration re = db.enumerate();

help !