File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes Inserting data in rms Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Inserting data in rms" Watch "Inserting data in rms" New topic
Author

Inserting data in rms

Anuj Prashar
Ranch Hand

Joined: Apr 15, 2008
Posts: 99

I am working on j2me application that can used for serving quiz to user.Application takes stream containing questions from server and presents questions
in an appropriate format to user.It has the facility to save questions to rms recordstore so that user can browse questions offline.
Now I want to add functionality so that user can add questions to recordstore in offline mode by using a jar file or any other resource that contains questions . I tried using another midlet which contains questions and code for inserting questions in recordstore. But this method has limitations.
As I have to install another application or midlet for inserting questions in recorstore & second since recordstore are shared only in midp 2.0 & not in midp 1.0, but I also want to include midp 1.0 for my applicaion.I dont want to use fileconnection api
I am thinking of saving questions in a xml file & making that file part of application and than inserting questions into rms.But after inserting questions in rms i want to delete the file.I want to know can i delete a file that is part of application and how.

I need suggestions how to insert questions in offline mode to recordstore without installing another application or sharing recordstore.


SCJP 5,SCWCD 5, RHCT
Kamal Trivedi
Ranch Hand

Joined: May 22, 2006
Posts: 38
Try in same midlet, because these will not create sharing issue & will work on both MIDP1.0 & MIDP 2.0
In order to insert data to mobile rms you have to generate "insert" & "delete" methods using "javax.microedition.rms.RecordStore"

Conclusion:- By using "Saving in offline mode" feature in same Midlet, you didn't have to install another application or share recordstore.


Kamal.B.Trivedi
Anuj Prashar
Ranch Hand

Joined: Apr 15, 2008
Posts: 99

Thanks for replying ....
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Inserting data in rms