Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2003

    Problem with IAP Table

    Hi all,

    I'm trying insert a new record in the IAP Table. My code look that:

    m_table = m_db->OpenTableLC(TPtrC(IAP));
    TInt r = m_table->InsertRecord(WIARecordId);
    if (r) RDebug::Print(_L("Error (%d)"), r);

    m_table->WriteTextL(TPtrC(COMMDB_NAME), _L("myconn"));
    m_table->WriteTextL(TPtrC(IAP_SERVICE_TYPE), TPtrC(OUTGOING_WCDMA));
    m_table->WriteUintL(TPtrC(IAP_SERVICE), 3);
    r = m_table->PutRecordChanges();
    if (r) RDebug::Print(_L("Error (%d)"), r);

    CleanupStack::PopAndDestroy(); // m_table

    All it's ok, but the PutRecordChanges return a -1 error code ("System. System Error"). If I do the same with other table, all works fine.

    Can anyone help me, please?

    Thank you,


  2. #2
    Regular Contributor
    Join Date
    Feb 2004
    Had the same problem and it is because Nokia simply does not stick to any rules. The following code works, just fill out every stupid column.

    error = view->InsertRecord(iapId);

    view->WriteTextL(TPtrC(COMMDB_NAME), iapName->Des());
    view->WriteUintL(TPtrC(IAP_SERVICE), gprsId);
    view->WriteUintL(TPtrC(IAP_NETWORK_WEIGHTING), 0);
    view->WriteUintL(TPtrC(IAP_NETWORK), nId);
    view->WriteUintL(TPtrC(IAP_BEARER), ...);
    view->WriteTextL(TPtrC(IAP_BEARER_TYPE), TPtrC(MODEM_BEARER));
    view->WriteUintL(TPtrC(IAP_LOCATION), 2);
    error = view->PutRecordChanges(EFalse, EFalse);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts