O'Reilly logo

BlackBerry Java Application Development by Bill Foust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - creating and opening a RecordStore

Creating a new RecordStore is a pretty simple operation. However, because we're going to create a new one each time the application is closed we also have to delete any previous record stores that might have been created already. This will all be done in the onClose method of the JournalMainScreen, which is called when the application is quitting.

  1. Add the following method to the JournalMainScreen class:
    protected void SaveEntriesRMS(Vector EntryList) throws RecordStoreNotOpenException, RecordStoreFullException, RecordStoreException { //Delete the existing recordstore if there is one. try { RecordStore.deleteRecordStore("JournalEntries"); } catch (RecordStoreException e1) { // Do nothing. It's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required