Есть код:
| Код | public void setSettings(){ RecordStore recordStore = null; String str = null; try { try { recordStore = RecordStore.openRecordStore("KIBStorage", true); } catch (Exception ex) { ex.printStackTrace(); } if (choiceGroup1.getSelectedIndex()==0){ str = "0"; currentOP="Beeline"; } if (choiceGroup1.getSelectedIndex()==1){ str = "1"; currentOP="Megafon"; } if (choiceGroup1.getSelectedIndex()==2){ str = "2"; currentOP="MTS"; } if (choiceGroup2.isSelected(0)){ workMode=true; //frmMain.set(0, "Служебный режим", work); if (frmOperFiz==null) { get_frmOperFiz(); } frmOperFiz.set(0, "Служ. остаток", work); } else { workMode=false; if (frmOperFiz==null) { get_frmOperFiz(); } frmOperFiz.set(0, "Остаток", work); } if (recordStore.getNumRecords() == 0) { recordStore.addRecord(str.getBytes(), 0, str.length()); if (choiceGroup2.isSelected(0)){ recordStore.addRecord("1".getBytes(), 0, "1".length()); } else { recordStore.addRecord("0".getBytes(), 0, "0".length()); } *recordStore.addRecord(txtPass.getString().getBytes(), 0, txtPass.getString().length()); } else { recordStore.setRecord(1, str.getBytes(), 0, str.length()); if (choiceGroup2.isSelected(0)){ recordStore.setRecord(2, "1".getBytes(), 0, "1".length()); } else { recordStore.setRecord(2,"0".getBytes(), 0, "0".length()); } if (txtPass.getString()=="") { txtPass.setString("0000"); } *recordStore.setRecord(3, txtPass.getString().getBytes(), 0, txtPass.getString().length()); } recordStore.closeRecordStore(); } catch (RecordStoreException ex) { ex.printStackTrace(); } }
|
И вот хоть убей, но не добавляется в этот RMS запись и соответственно не записывается, не отрабатываемая строчка отмечена звездочкой. |