Hi

When I create an access pointis programatically , it goes to the uncategorised destination in 3rd edition FP2 and 5th edition.
In case browser's selected option is "Always Ask", the profiles in the uncategorised destination are also shown for selection.
But, when any profile is deleted programatically , I don't see any "uncategorised destination" for selection, even if "Always Ask" has been selected.
Here is the code I am trying to use to delete the access point .


void DeleteProxyL(CCommsDatabase* commDB,TDesC& GprsProfile)
{
TBuf<200> iapName;
TInt err;
// open the IAP communications database
TUint32 iapService;
HBufC* iapServiceType;

// Open the IAP table
CCommsDbTableView* view = commDB->OpenTableLC(TPtrC(IAP));
// Point to the first entry
//console->Getch()
if (view->GotoFirstRecord() == KErrNone)
{

//console->Getch()
do
{
view->ReadTextL(TPtrC(COMMDB_NAME), iapName);
//console->Getch()
if (iapName.Compare(GprsProfile) == 0)
{

view->ReadUintL(TPtrC(IAP_SERVICE), iapService);
iapServiceType = view->ReadLongTextLC(TPtrC(IAP_SERVICE_TYPE));

CCommsDbTableView* proxyTableView = commDB->OpenViewOnProxyRecordLC(iapService, *iapServiceType);
//console->Getch()
if (KErrNone == proxyTableView->GotoFirstRecord())
{
do
{
//console->Getch()
TInt errCode = proxyTableView->DeleteRecord();
while (errCode == KErrLocked)
{
User::After(250000);
errCode = proxyTableView->DeleteRecord();
}
}
while (err = proxyTableView->GotoNextRecord(), err == KErrNone);
}

CleanupStack::PopAndDestroy(2); //proxyTableView & iapServiceType
break;
}
// Store name and ID to where you want to
}while (err = view->GotoNextRecord(), err == KErrNone);
}

CleanupStack::PopAndDestroy(1); // view
}


void DeleteBearerL(CCommsDatabase* db,TDesC& GprsProfile)
{
TInt err;
TBuf<30>wapApName;

CCommsDbTableView* view = db->OpenTableLC(TPtrC(WAP_ACCESS_POINT));
if (view->GotoFirstRecord() == KErrNone)
do
{
view->ReadTextL(TPtrC(COMMDB_NAME), wapApName);
if(wapApName.Compare(GprsProfile)==0)
{
User::After(1000000);

TInt errCode = view->DeleteRecord();
while(errCode == KErrLocked)
{
User::After(1000000);
errCode = view->DeleteRecord();
}
break;
}
wapApName.Zero();
}
while (err = view->GotoNextRecord(), err == KErrNone);
CleanupStack::PopAndDestroy(view);
//delete view;
}

void DeleteNetworkL(CCommsDatabase* db,TDesC& GprsProfile)
{
TInt err;
TBuf<30>profileName;

CCommsDbTableView* view = db->OpenTableLC(TPtrC(NETWORK));
if (view->GotoFirstRecord() == KErrNone)
do
{
view->ReadTextL(TPtrC(COMMDB_NAME), profileName);
if(profileName.Compare(GprsProfile)==0)
{
User::After(1000000);
TInt errCode = view->DeleteRecord();
while(errCode == KErrLocked)
{
User::After(1000000);
errCode = view->DeleteRecord();
}
break;
}
}
while (err = view->GotoNextRecord(), err == KErrNone);
CleanupStack::PopAndDestroy(view);
}

void DeleteGprsServiceL(CCommsDatabase* db,TDesC& GprsProfile)
{
TInt err;
TBuf<30>wapApName;

CCommsDbTableView* view = db->OpenTableLC(TPtrC(OUTGOING_GPRS));
if (view->GotoFirstRecord() == KErrNone)
do
{
view->ReadTextL(TPtrC(COMMDB_NAME), wapApName);
if(wapApName.Compare(GprsProfile)==0)
{
User::After(1000000);

TInt errCode = view->DeleteRecord();
while(errCode == KErrLocked)
{
User::After(1000000);
errCode = view->DeleteRecord();
}
break;
}
wapApName.Zero();
}
while (err = view->GotoNextRecord(), err == KErrNone);
CleanupStack::PopAndDestroy(view);

}

void DeleteBearerL(CCommsDatabase* db,TDesC& GprsProfile)
{
TInt err;
TBuf<30>wapApName;
CCommsDbTableView* viewIAP;
//TRAPD( i, view = db->OpenIAPTableViewMatchingBearerSetLC(ECommDbBearerGPRS,ECommDbConnectionDirectionOutgoing));
viewIAP=ComDB->OpenTableLC(TPtrC(IAP));
TBuf<40> prfName;
TUint32 iapID;
if (viewIAP->GotoFirstRecord() == KErrNone)

do
{
viewIAP->ReadTextL(TPtrC(COMMDB_NAME), prfName);

if( prfName.Compare(GprsProfile)==0)
{
viewIAP->ReadUintL(TPtrC(COMMDB_ID), iapID);
break;
}
}
while(err = viewIAP->GotoNextRecord(), err == KErrNone);
CleanupStack::PopAndDestroy();


CCommsDbTableView* view = db->OpenTableLC(TPtrC(WAP_IP_BEARER));
TUint32 aptID;
if (view->GotoFirstRecord() == KErrNone)
do
{
view->ReadUintL(TPtrC(WAP_ACCESS_POINT_ID), aptID);
if(aptID==iapID)
{
User::After(1000000);

TInt errCode = view->DeleteRecord();
while(errCode == KErrLocked)
{
User::After(1000000);
errCode = view->DeleteRecord();
}
break;
}
wapApName.Zero();
}
while (err = view->GotoNextRecord(), err == KErrNone);
CleanupStack::PopAndDestroy(view);
}

void DeleteIAPL(CCommsDatabase* db,TDesC& GprsProfile)
{
TInt err;
TBuf<30>wapApName;

CCommsDbTableView* view = db->OpenTableLC(TPtrC(IAP));
if (view->GotoFirstRecord() == KErrNone)
do
{
view->ReadTextL(TPtrC(COMMDB_NAME), wapApName);
if(wapApName.Compare(GprsProfile)==0)
{
User::After(1000000);

TInt errCode = view->DeleteRecord();
while(errCode == KErrLocked)
{
User::After(1000000);
errCode = view->DeleteRecord();
}
break;
}
wapApName.Zero();
}
while (err = view->GotoNextRecord(), err == KErrNone);
CleanupStack::PopAndDestroy(view);
}

Please help me with the same.

Thanks and Regards
Monika Parvanda