Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

This is how i am adding a single record in to the pim_IContacts

Step no.1: if (results = (pim_IContacts_CreateRecord(pMe->pContacts, &pMe->pRecord)) != AEE_SUCCESS)
{
return FALSE;
}

Step no.2: pim_IContactsRecord_SetFieldValue(pMe->pRecord,"Name/1/Type",(AECHAR*)L"FIRSTNAME");
pim_IContactsRecord_SetFieldValue(pMe->pRecord,"Name/1/Value",(AECHAR*)L"Abhay");

pim_IContactsRecord_SetFieldValue(pMe->pRecord,"Name/2/Type",(AECHAR*)L"LASTNAME");
pim_IContactsRecord_SetFieldValue(pMe->pRecord,"Name/2/Value",(AECHAR*)L"Kumar");

pim_IContactsRecord_SetFieldValue(pMe->pRecord,"Phone/1/Type",L"CELL");
pim_IContactsRecord_SetFieldValue(pMe->pRecord,"Phone/1/Value",L"9995555678");

if(pim_IContactsRecord_SetFieldValue(pMe->pRecord,"Org",(AECHAR*)L"Infotech")!= AEE_SUCCESS)
{
return FALSE;
}

if (results = (pim_IContacts_AddRecord(pMe->pContacts, pMe->pRecord)) != AEE_SUCCESS)
{
return FALSE;
}

To add the next record i use the same code as above except Step no.1, but it sometimes crashes on doing, is there any other alternative way to archive adding of multiple records.

Hi Vas,
Did you try to create a new Contacts Record each time you Add it to the Database?
Regards,
Anand

Hi Vas,
Did you try to create a new Contacts Record each time you Add it to the Database?
Regards,
Anand