×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jul 2008
    Location
    Delhi, India
    Posts
    285

    Question why increasing databse size?

    TInt CSmsDb::RemoveSms(const TInt32 & aIndex)
    {
    RDbUpdate updOp;

    _LIT(KDeleteFrom, "DELETE FROM ");
    _LIT(KWhere, " WHERE ");
    _LIT(KEqual, " = ");

    TBuf16<10> temp_index;
    temp_index.Num(aIndex);

    // Sql: DELETE FROM SMS WHERE Index == aInxex'
    TBuf<KCustomSqlMaxLength> sqlStr; //KCustomSqlMaxLength
    sqlStr.Copy(_L(""));
    sqlStr.Append(KDeleteFrom);
    sqlStr.Append(KSmsTable);
    sqlStr.Append(KWhere);
    sqlStr.Append(KIndexCol);
    sqlStr.Append(KEqual);
    sqlStr.Append(temp_index);


    // Initialize execution and perform the first step.
    // Note: Execute() returns 0 (=KErrNone), but it does not affect database
    // until Next() is called.
    TInt incStat = updOp.Execute(iSmsDb, sqlStr);
    incStat = updOp.Next(); // This will leave, if Execute() failed.

    while( incStat == 1 ) // Just in case, if the operation has more steps
    {
    incStat = updOp.Next();
    }
    updOp.RowCount();
    updOp.Close();
    return incStat; // KErrNone or system wide error code
    }


    this function is intended to delete the record of specific index in the table. It does, but the size of database increases every time this function is called........

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: why increasing databse size?

    have you checked the SDK docs (or header file) for the database API, it should have compress or similarly named function that does the compacting of the database.

  3. #3
    Regular Contributor
    Join Date
    Jul 2008
    Location
    Delhi, India
    Posts
    285

    Re: why increasing databse size?

    thaks,

    it's iSmsDb.Compact();

Similar Threads

  1. Increasing Size of Index file in Mail Folder
    By astroswanand in forum General Development Questions
    Replies: 1
    Last Post: 2008-07-09, 13:09
  2. Increasing Heap size
    By earamsey in forum Mobile Java General
    Replies: 3
    Last Post: 2007-10-18, 17:58
  3. Audio Input Stream on N80
    By tkaihock in forum Symbian Media (Closed)
    Replies: 9
    Last Post: 2006-06-30, 09:15
  4. Replies: 1
    Last Post: 2004-07-16, 04:10
  5. User break point error in Grid
    By ag24master in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-08-07, 08:20

Posting Permissions

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