insert this in the startApp method.
Code:
try
         {
            RecordStore rs = RecordStore.openRecordStore("name", true);
            RecordEnumeration re = rs.enumerateRecords(null, null, true);
            
            String one = "a";
            String two = "b";
            String three = "c";
            String[][] x = new String[3][3];
            byte[] b;
            
            System.out.println(rs.getNextRecordID());
            b = one.getBytes();
            rs.addRecord(b, 0, b.length);
            System.out.println(rs.getNextRecordID());
            b = two.getBytes();
            rs.addRecord(b, 0, b.length);
            System.out.println(rs.getNextRecordID());
            b = three.getBytes();
            rs.addRecord(b, 0, b.length);
            System.out.println(rs.getNextRecordID());

            rs.deleteRecord(1);
            
            re.rebuild();

            System.out.println(re.isKeptUpdated());
            System.out.println(re.nextRecordId());
            //System.out.println(re.previousRecordId());
            System.out.println(re.numRecords());
         }

        catch (RecordStoreException ex) {
            ex.printStackTrace();
        }
why isnt this working? I read the documentation. It said that if i set the update to true i might face performance but at least i guarantee i wont get bad results when sorting or searching. so how come the num of records (last line) is 2? i entered 4 records. i deleted record number 1. so i expect to get 2,3,4 when i run the second print line 4 times. but i didnt. i got an invalididexception. i tried hte last print line and surprisingly i only have 2 records which explains why i got the exception.
i even read about rebuild.

im trying to implement a delete funciton on records in my store.