×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Location
    mumbai,india
    Posts
    94

    saving form data to database

    I try to copy the data from form to database but emulator exit's when it start SaveFormData()

    here is what i code?

    TBool CBankForm::SaveFormDataL()
    {
    // TODO save values

    TBuf<100 > buf;
    TBuf8<20> buf2;
    TBuf8<40> buf3;
    TBufC<32> msg;
    msg = _L("Failed. Make sure the fields are not empty.");
    TInt err(KErrNone);

    CBankDatabase* iBankDb = CBankDatabase::NewL();
    TBankTableItem* iBankTableItem = new (ELeave) TBankTableItem();
    CleanupStack::PushL(iBankTableItem);

    iBank->GetText(buf);

    //iBankTableItem->SetBankName(buf);

    iBankTableItem->iBankName.Copy(buf);
    iAcc->GetText(buf);
    iBankTableItem->iAccNo.Copy(buf);
    iBalance->GetText(buf);
    iBankTableItem->iBal.Copy(buf);

    //iAccNo->GetText(buf);

    //iBal->GetText(buf);
    iBankDb->CreateBankTableTableL();
    err = iBankDb->AddBankTableRecord(*iBankTableItem);

    CleanupStack::PopAndDestroy(iBankTableItem);

    if(err)
    RunDbnote1L(&msg);
    else
    return ETrue;

    return ETrue;
    }

  2. #2
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: saving form data to database

    One thread per query is usually enough. Refer to http://discussion.forum.nokia.com/fo...d.php?t=160351

Similar Threads

  1. Form troubles
    By matdodgson in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-12-06, 10:49
  2. work with forms data at form run time
    By palple in forum Symbian
    Replies: 1
    Last Post: 2008-04-03, 04:32
  3. Using RDbView to query data from database gets leave (KErrCorrupt)
    By stellar776 in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2005-01-06, 22:47
  4. Link the data from the database
    By soonbee in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-05-14, 14:24

Posting Permissions

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