hi yuca need your help!
i m facing a problem of finding a number in contact database
i am programming for nokia 9500
using the folling code although it is working fine,
pls tell me how to make the search faster iContactDatabase->PhoneMatchListL
is deprecated for symbian os 7.0
pls help...



TInt CMyEngine::SearchName(TDes &number)
{

number.Right(10);
TBuf<50> tempnumber;

aImei = number.AllocL();
tempnumber.Zero();
tempnumber.Append(aImei->Right(10));
//CEikonEnv::Static()->AlertWin(tempnumber );
//iEikonEnv->AlertWin(buf20);
//iEikonEnv->AlertWin(temp);

TInt errorCode(-2);
iVnm.Zero();
iVnm.Copy(number);

phoneno.Append( _L("9811569329") );

phoneno.Trim();

matching_contact_ids = NULL;//CContactIdArray::NewL( );

TInt co = iContactDatabase->CountL();

if (co > 0)
{
TRAP(errorCode, matching_contact_ids = iContactDatabase->PhoneMatchListL( tempnumber ) );


if ( ( errorCode != KErrNotFound || errorCode == KErrNone ) )
{

if ( matching_contact_ids->Count() >= 1 )
{
//CEikonEnv::Static()->AlertWin(_L("More than one"));

id = matching_contact_ids->operator[](0);
TContactIter iTer= TContactIter(*iContactDatabase);
TRAPD( readErr1 , aContactItem = iContactDatabase->ReadContactL( iTer.FirstL() ) );

if ( readErr1 != KErrNone )
{
// CEikonEnv::Static()->AlertWin( _L("Err REa") );
return -1;
}
iContactDatabase->CloseContactL( iTer.FirstL() );



TRAPD( readErr , aContactItem = iContactDatabase->ReadContactL( id ) );

if ( readErr != KErrNone )
{
// CEikonEnv::Static()->AlertWin( _L("Err REa") );
return -1;
}

TInt iField=aContactItem->CardFields().Find(KUidContactFieldGivenName);
TInt iField2=aContactItem->CardFields().Find(KUidContactFieldFamilyName);

vname1.Copy(aContactItem->CardFields()[iField2].TextStorage()->Text());
vname.Copy(aContactItem->CardFields()[iField].TextStorage()->Text());

if (iField2==0)
{
vname.Append(vname1);

}

iContactDatabase->CloseContactL(id);

return 0;


}//end of countid




}//end of errpor code




return -1;


}//end of co