×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    15

    RMS read write help

    Hi!
    My app requires me to save a record in the following format:
    Assume MEDICINE_RMS contains the following records
    record1={String,int,int,int,long,long,long,int}
    record2={String,int,int,int,long,long,long,int}
    .
    .
    and so on.
    I have few doubts regarding this:

    1.Each record(record1,record2.etc) signifies a Medicine in my App, Medicines can be added in any session, i.e the App
    can be run today exited and again after few days it could be opened and another Medicine can be added.
    My doubt here is each time i add a new Medicine in different sessions will the record overwrite the previously entered
    records??
    for example:
    say today i add a medicine "ABC" and save it and exit the App,and tomo i open the App again add another medicine say
    "XYZ" will this result in overwriting of "ABC"??

    2.I need to read the ONLY the long data type values from the record and store it temporarily in an array,after
    that i need to eliminate all duplicate values and then sort(ascending) the array,then write again separately into a different
    RMS- TO_BE_PUSHED_RMS, each time the app invokes i need to read this RMS and delete the first entry copy the second entry into a long variable and later push this value in PushRegistry.
    is this possible??
    i am more worried about the first part(copying oly long values).

    3.The solution to the above problem may be to use RecordEnumerator, firstly i do not know how to apply RecordFilter
    ir RecordComparator secondly will using the RecordEnumeration affect the original RMS which is being enumerated,
    as in will it get manipulated??

    4.Please Please Please give a example of handling RMS including enumerator with filter and compartor (entire prog)
    if anyone has done a assignment on it! it will be really helpful to me and other having same doubts!

    Please reply guys!, i really need help on this!!

    Thank you!

  2. #2
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: RMS read write help

    Hi deepakkinni ,

    To make your requirement add one more fields in to your record i.e your own ID to the record then your record will become like this
    record1={ID1,String,int,int,int,long,long,long,int}
    record1={ID2,String,int,int,int,long,long,long,int}

    Then write the RecordFilter and Comparator .
    here is the example how to use the record comparator and filter
    http://wiki.forum.nokia.com/index.ph...sorting_in_RMS

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    15

    Re: RMS read write help

    Hi bhanu!
    I do not want to sort the records...i want to extract only values of long data type from the record and then sort them and then place them into another record!

  4. #4
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: RMS read write help

    Hi deepakkinni,

    Please go through this articalse

  5. #5
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: RMS read write help


  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: RMS read write help

    Since the total amount of data you have will be very small, I suggest you store all your data in a single record. Load everything, and sort or search it in memory. When you update it, write everything back to RMS.

    Avoid the filter and comparator classes.

    You'll find some example code in the wiki.

    Graham.

Similar Threads

  1. Read back from RMS
    By bumble-bee in forum Mobile Java General
    Replies: 7
    Last Post: 2010-01-09, 21:49
  2. could we read and write in rms altogether?
    By huriniin in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2009-05-23, 06:16
  3. how to read read and write the calendar entries
    By Basu in forum Mobile Java General
    Replies: 2
    Last Post: 2007-12-13, 10:22
  4. read RMS records
    By artemg in forum Mobile Java General
    Replies: 1
    Last Post: 2004-01-10, 22:30
  5. Persistent memory storage RMS delayed write.
    By AndrewMiah_iFone in forum Mobile Java General
    Replies: 1
    Last Post: 2003-06-24, 14:25

Posting Permissions

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