Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User goyal_sunil's Avatar
    Join Date
    May 2005
    Posts
    3
    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 grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    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
  •  
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