Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Record management system

 
Salil Khanwalkar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have created a .pdb file for my palm application. Now i want to open and add some records in it using rms. My code to add and save record is...

if (c == addCommand) {
mainForm.append(tf); // text field
}
if (c == saveCommand) {
text = tf.getString();
System.out.println(text);
byte[] bytes = text.getBytes();
try {
recordStore = RecordStore.openRecordStore("D:\\names.pdb",false);
recordStore.addRecord(bytes,0,bytes.length);
} catch (RecordStoreException rse) {
rse.printStackTrace();
} catch(IndexOutOfBoundsException ioe) {
ioe.printStackTrace();
}
}
if(c == exitCommand) {
destroyApp(false);
notifyDestroyed();
}

No record is being added..into names.pdb
How to open and add records in it.

Regards,
Salil.
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Record store" in Palm OS is completely different from that in J2ME. You cannot access and parse Palm pdb files from J2ME. You cannot copy (or backup) the J2ME record store like a file either.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does http://www.javaworld.com/javaworld/jw-05-2002/jw-0531-palm.html link help in anyway to us?

Regards,
Maulin
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Maulin Vasavada:

Does http://www.javaworld.com/javaworld/jw-05-2002/jw-0531-palm.html link help in anyway to us?


Probably not. You can read it yourself. It talks about how to create a special kind of MIDP-RMS-compatible PDB files from the PC side Java conduit. You can then open the PDB from MIDP using the RMS name. There is still no way to access generic PDB files from MIDP. Also, the PDB format for RMS is not an open API -- it may or may not work for a given Palm device. Notice that article was written in 2002, a VERY long time ago for J2ME.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from the PC side Java conduit.

I guess I missed that critical part Sorry about that.

Thanks
Maulin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic