×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    3

    RMS Corruption - on removing phone battery

    Hello all,
    i am facing the following problem:
    RecordStore gets corrupted on nokia series 40 phone, if while my application is running and I delibrately remove the phone battery.

    Exact sequence of steps:
    - Launch Application
    - Create RecordStore
    - Write Data
    - Close RecordStore
    - Open RecordStore
    - Visualize Data in Application

    - Remove Phone Battery to test corruption.

    - Insert Battery again, Switch on the phone and on launching the application again, application fails to start - RMS gets corrupted.

    Since I had already closed the recordstore after writing the data, shouldn't the data be persistent even I remove the battery?

    Or is it something else I need to do to make data persistent to prevent such corruptions.

    Thanks
    Sunil

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395
    This fix (http://discussion.forum.nokia.com/fo...threadid=61748) should help to minimize the chance of this problem too.

    Also, try to minimize the time for which the record store is held open. Ensure that record stores are closed after use. Code your record store operations something like:
    Code:
    try {
        RecordStore rs = RecordStore.openRecordStore("mystore");
        try {
            // read or write record store here
        } finally {
            rs.close();
        }
    } catch (RecordStoreException rse) {
        // handle exception
    }
    Graham.

Posting Permissions

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