Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User harshalpatil's Avatar
    Join Date
    Apr 2007
    Posts
    23
    Hi....
    i m doing an application and i want to store the data in the record store.
    i succeeded in inserting the records in database.
    but the problem is while Deleting the records...
    it delete only one record.. and after that no data will be inserted or deleted..
    what will be the problem...
    How to set the maximum size of Record store..
    Thanx in advance...

  2. #2
    Regular Contributor alicegue's Avatar
    Join Date
    Jul 2004
    Posts
    56
    Can you provide some of your coding?

  3. #3
    Registered User harshalpatil's Avatar
    Join Date
    Apr 2007
    Posts
    23
    Hi allceglue,
    i m sending my code as u said..

    if (rs.getNumRecords() == 25)
    {

    rs.deleteRecord(1); //Here is the problem
    rs.closeRecordStore();

    rs = RecordStore.openRecordStore("MYInbox", true);
    re = rs.enumerateRecords(null, null, false);
    while (re.hasNextElement())
    {
    int id = re.nextRecordId();
    if (id == 1)
    //if(id == MAX)
    {
    id--;
    rs.deleteRecord(id);
    MailList1.deleteAll();
    System.out.println("Here Maillist1 is blank...");
    }
    }

    re.destroy();
    }

    rs.addRecord( array,0,array.length);
    rs.closeRecordStore();

    }

  4. #4
    Regular Contributor alicegue's Avatar
    Join Date
    Jul 2004
    Posts
    56
    >> rs.deleteRecord(1);

    The first record index will not always equal to 1 after you has add/delete some record from the RMS.

  5. #5
    Regular Contributor alicegue's Avatar
    Join Date
    Jul 2004
    Posts
    56
    My suggestion is to add another integer variable to your RMS and then delete the first record after sorting it.

Similar Threads

  1. j2me polish problem
    By jonneymendoza in forum Mobile Java General
    Replies: 2
    Last Post: 2007-03-09, 23:43
  2. big jar file size problem b/c satellite and roadmaps are needed
    By sukotheruler in forum Mobile Java General
    Replies: 1
    Last Post: 2006-06-16, 11:54
  3. J2ME Wireless Toolkit 2.2 & Series 60 MIDP SDK problem
    By schmooz in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2005-11-28, 22:26
  4. A Different Jar Size Limit Problem
    By cicdem in forum Mobile Java General
    Replies: 0
    Last Post: 2004-06-17, 15:01
  5. Replies: 2
    Last Post: 2002-05-10, 15:19

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved