palm os and rms

Hi, I have a question and I was not able to find an answer over internet. I have to permanently store data on a palm os device using either rms or jrs75. I heard about some severe limitations using java and the ibm VM with palm databases but opinions are often confuse, then:
-What can I do on palm OS and what can I do not concerning data storage? I only need to write data in a 'file' and then retrive it back again in other sessions.
-Does the simulator of garnet 5.4 support these things? I wrote the following code, that works on the MIDP reference simulator provided by sun, but the palm sim halts on execution.
What's wrong?

public class database extends MIDlet
public Display display;
public Form form;
public RecordStore db;

public void startApp()
db = RecordStore.openRecordStore("HW", true);
}catch(RecordStoreException e){}

display = Display.getDisplay(this);
form = new Form("Database test");
String str = new String("Inizio Midlet...
form.append("scrittura in corso...

String appt = "new record";
byte bytes[] = appt.getBytes();
db.setMode(db.AUTHMODE_ANY, true);
}catch(RecordStoreNotOpenException e){ form.append("Noopen1");}
catch(RecordStoreException a){form.append("recordstore1");}

RecordEnumeration enum = db.enumerateRecords(null, null, false);
int a = enum.nextRecordId();
byte[] b = new byte[20];
db.getRecord(a, b, 0);
String s = new String(b);
form.append("contenuto database:");
}catch(RecordStoreNotOpenException e){form.append("noopen2");}
catch(InvalidRecordIDException i){form.append("idinv2"); }
catch(RecordStoreException a){form.append("recordstore2");}

public void destroyApp(boolean c)
}catch(RecordStoreNotOpenException e){}
catch(RecordStoreException a){}

public void pauseApp() {}
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!