At the moment I'm using a recordstore to store some measure values. At he moment I have a recordstore of 1.45MB but when I open it and call the method getNumRecords it returns 0. Is this an example of a corrupted recordstore?
Not any exception is trown.
private void openRecordStore() {
Debug.log(System.out, "Opening recordstore...");
this._recordAdministration = new Vector();
try {
String[] stores = RecordStore.listRecordStores();
if(stores != null) {
for(int i = 0; i < stores.length; ++i) {
Debug.log(System.out, "RecordStoreList --> Store: " + stores[i]);
}
}
this._recordStore = RecordStore.openRecordStore(this._recordStoreName, true);
Debug.log(System.out, "RecordStoreList --> number of records: " + this._recordStore.getNumRecords());
RecordEnumeration re = this._recordStore.enumerateRecords(null, null, false);
while (re.hasNextElement()) {
int recordId = re.nextRecordId();
this._recordAdministration.addElement(new Integer(recordId));
}
} catch (Exception e) {
Debug.log(System.out, "RecordStoreList --> EXCEPTION --> " + e.getMessage());
e.printStackTrace();
closeRecordStore();
deleteRecordStore();
openRecordStore();
}
Debug.log(System.out, "Recordstore is open...");
}