Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Create IAP for Nokia 9300

0 replies · 1,315 views · Started 21 April 2005

We try to create a internet connect point on a 9300

Here are some of the code...

CCommsDatabase *cdb = CCommsDatabase::NewL(EDatabaseTypeIAP);

CCommsDbTableView* commView = cdb->OpenIAPTableViewMatchingBearerSetLC(ECommDbBearerC SD|ECommDbBearerGPRS,ECommDbConnectionDirectionOut going);

cdb->BeginTransaction();

TUint32 gprsId;
view = cdb->OpenTableLC(TPtrC(OUTGOING_GPRS));

User::LeaveIfError(view->InsertRecord(gprsId));

view->WriteTextL(TPtrC(COMMDB_NAME), iapName);
view->WriteUintL(TPtrC(GPRS_PDP_TYPE), 0);

view->WriteBoolL(TPtrC(GPRS_IP_ADDR_FROM_SERVER), gprsIpFromServer.Compare(_L("1"😉) == 0);
view->WriteBoolL(TPtrC(GPRS_IP_DNS_ADDR_FROM_SERVER), gprsDnsFromServer.Compare(_L("1"😉) == 0);

view->WriteTextL(TPtrC(GPRS_IF_AUTH_NAME), gprsIfAuthName);
view->WriteTextL(TPtrC(GPRS_IF_AUTH_PASS), gprsIfAuthPass);
view->WriteTextL(TPtrC(GPRS_APN), gprsApn);
view->WriteBoolL(TPtrC(GPRS_IF_PROMPT_FOR_AUTH), EFalse);

error = view->PutRecordChanges();
CleanupStack::PopAndDestroy();

view = cdb->OpenTableLC(TPtrC(IAP));

TUint32 iapId;
User::LeaveIfError(view->InsertRecord(iapId));

view->WriteTextL(TPtrC(COMMDB_NAME), iapName);

view->WriteTextL(TPtrC(IAP_SERVICE_TYPE), TPtrC(OUTGOING_GPRS));

view->WriteUintL(TPtrC(IAP_SERVICE), gprsId);
error = view->PutRecordChanges();

CleanupStack::PopAndDestroy(view);

This does not work on 9300. does know any working code? Please, i'm in big needs.