Hi,
I wasn't able to add data previously so I try some other ways to create database.
I managed to add dummies data into a database...
The problem now is to add data (contact name, contact number) that is read from array together with defined key into the database. No error while adding data but I found it's empty when I open the database.Code:void CSMSExampleAddressContainer::CreateRecordL() { _LIT( KName, "Nini"); _LIT( KPhone, "0122536387"); _LIT(KKey, "1234"); TBuf<50> bufName; TBuf<50> bufPhone; TBuf<50> bufPublicKey; bufName = KName; bufPhone = KPhone; bufPublicKey = KKey; iEngine->SetName( bufName ); iEngine->SetPublicKey( bufPublicKey ); iEngine->SetPhone( bufPhone ); // Now create the record iEngine->AddRecordL(); }
Do you have any idea what mistake I did?Code:void CSMSExampleAddressContainer::CreateRecordL() { TBuf<50> bufName; TBuf<50> bufPhone; TBuf<50> bufPublicKey; bufName = KName; bufPhone = KPhone; bufPublicKey = KKey; // Get current contact name in listbox TInt Index = iAddListBox->CurrentItemIndex(); bufPhone.Copy((*iNumberArray)[Index]); // Get contact number in array bufName.Copy((*iTextArray)[Index]); // Get contact name in array iEngine->SetName( bufName ); iEngine->SetPublicKey( bufPublicKey ); iEngine->SetPhone( bufPhone ); // Now create the record iEngine->AddRecordL(); }
Thanks...




