problem with Delete contact | developer.brewmp.com problem with Delete contact | developer.brewmp.com

Developer

problem with Delete contact

Forums:

hi everyone

i am newbie here. i am creating a record and display it on the screen of emulator its work fine but when i delete that record then the record is not deleted.my code is

STRTOWSTR("imran" , pMe->pName , 20*sizeof(AECHAR));
//pMe->Add_ERec =
//pMe->Add_Count = IADDRREC_GetFieldCount(pMe->pAddrRec);
pMe->Add_ERec = IADDRBOOK_EnumRecInit(pMe->pAddrBook,AEE_ADDR_CAT_NONE,AEE_ADDRFIELD_NAME,pMe->pName,WSTRLEN(pMe->pName));
if (pMe->Add_ERec == AEE_SUCCESS)
{
pMe->pAddrRec = IADDRBOOK_EnumNextRec(pMe->pAddrBook);
if(pMe->pAddrRec)
{
if (IADDRREC_RemoveRec(pMe->pAddrRec)== AEE_SUCCESS)
{
DBGPRINTF("Record Removed");
}
else
DBGPRINTF("Record Failed");
}

when i debug my code it get NULL on this pMe->pAddrRec . where i am going wrong. please help me

thankx

First try with
IADDRBOOK_EnumRecInit(pAddrBook, AEE_ADDR_CAT_NONE, AEE_ADDRFIELD_NONE,NULL,0);
This should get all the rec and see if one rec is deleted. If so, then there is a problem with your name search.

First try with
IADDRBOOK_EnumRecInit(pAddrBook, AEE_ADDR_CAT_NONE, AEE_ADDRFIELD_NONE,NULL,0);
This should get all the rec and see if one rec is deleted. If so, then there is a problem with your name search.