1. Comment out the previous implementation in the
SaveEntriesRMS
method.// //Delete the existing recordstore if there is one. // try // { // RecordStore.deleteRecordStore("JournalEntries"); // } // catch (RecordStoreException e1) // { // // Do nothing. It's entirely possible that the recordstore // //doesn't exist // // yet and will throw an exception. Just silently ignore it. // }
2. Add the following enumeration in the same method after the
RecordStore
has been opened.
The program behavior didn't change at all with this latest change. Instead, you just changed how the RecordStore
is cleaned when saving the data. Previously, you deleted the entire RecordStore
and then recreated it with the call to openRecordStore
.
This approach deletes any existing records from the...