×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    49

    Record Store and Enumeration questions

    hi, i implemented this to store some data on a recordstore

    rs.setRecord(1, a, 0, length1);
    rs.setRecord(2, b, 0, length2);
    rs.setRecord(3, c, 0, length3);

    i have ensured that they're all running well, al datas are stored, there are no null fields

    however i encountered a problem in restoring the data
    this is what i do:

    while(enum.hasNextElement()){
    id = enum.nextRecordId();
    size = rs.getRecordSize(id);
    data = new byte[size];
    int i = rs.getRecord(id,data,0);
    //processing the data
    }

    the problem is, while i got 3 recordstore fields, sometimes i can't get the recordstore id 2.

    i did a debug, and on the first loop, i get the id 3, then retrieve the data. but on next enum.nextRecordId(), the result jumps into 1. the record id 2 is somehow skipped and unread.

    anybody ever encountered the problem? any helps would be appreciated. thanks.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    49
    anybody?

  3. #3
    Regular Contributor
    Join Date
    Oct 2003
    Posts
    75
    I also have similar problem...
    i dunno y my program can just read and store for 2 records. Records other than that 2 cannot be read and stored.

  4. #4
    Registered User
    Join Date
    Dec 2003
    Posts
    11

    Any Answer to this

    Is there an answer to this?

    Does recordstore only permit 2records??

  5. #5
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    I've heard something similar reported on the 3410i... what devices are you people using?

    Graham.

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    49
    i'm using Nokia 3105 (CDMA)

  7. #7
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    Never heard of it.

    But your problem sounds similar to: http://discussion.forum.nokia.com/fo...threadid=34277.

    Graham.

  8. #8
    Registered User
    Join Date
    Dec 2003
    Posts
    11

    cut and paste technology

    no big mystery.

    there can be 2 reasons for this, both caused by cut and paste:
    1) the existing code does not create a 3rd record
    2) the set method checks for 2 enum codes. If the 3rd isnt included, it doesnt get written,

    I guess we all referred to sample code. Cut and Paste technology...

    thanks

    fl45

  9. #9
    Regular Contributor
    Join Date
    Oct 2003
    Posts
    75
    my problem was solved ...
    in the emulator, i just can store 2 records
    however, in the device, Nokia 6600, it can store all the record i written...

    so i think this is the bug of the emulator...

Posting Permissions

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