HI,
I am writing series 80 application.
When my application is launched I am trying to read the contacts from the
default contact database and copy them to MyContactDatabase(KMyFile).
Reading from the default contact database is OK.
But when i try to Add that contact to MyDataBase application is Hanging.(temp = iSrc->AddNewContactL(*itemold)😉
It gives System Error:: System Not Ready...
_LIT(KMyFile,"\\system\\data\\Contactsuti.cdb"😉;
iDest =CContactDatabase::OpenL ();
CleanupStack::PushL (iDest);
iSrc = CContactDatabase::OpenL (KMyFile);
CleanupStack::PushL (iSrc);
CContactItem* itemold;
TContactItemId oldcard,temp;
TContactIter clean(*iDest);
while( ( oldcard = clean.NextL() ) != KNullContactId )
{
TRAPD(err, (itemold = iDest->ReadContactL(oldcard)));
if(err == KErrNotFound)
{
itemold = NULL;
continue;
}
CleanupStack::PushL(itemold);
temp = iSrc->AddNewContactL(*itemold);
iSrc->CloseContactL(temp);
iDest->DeleteContactL(oldcard);
CleanupStack::Pop();
delete itemold;
itemold = NULL;
}
What could be the problem?
Plaease guide me if someone have the answers..
Thanks ion advance
Shashi