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 I am not able to retrive the data from RecordStore of rms file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "I am not able to retrive the data from RecordStore of rms file" Watch "I am not able to retrive the data from RecordStore of rms file" New topic
Author

I am not able to retrive the data from RecordStore of rms file

rajeshyadav mobi
Greenhorn

Joined: Apr 18, 2011
Posts: 25
Hi, This is Rajesh Presently working on j2me , i am able to insert data in my recordstore and access the data , The problem is that when i am exit the application and again start the same application i am getting
javax.microedition.rms.RecordStoreNotFoundException:
This is My Code

public void ReadDetails1() throws RecordStoreFullException, RecordStoreNotFoundException, RecordStoreException
{

String result = "";
rs = RecordStore.openRecordStore(recordname, false);// I


byte[] data;
RecordFilter rf = new averageFilter();
RecordEnumeration re = rs.enumerateRecords(rf, null, false);
System.out.println("before while for fetching records");


while(re.hasNextElement())
{
System.out.println("IN while loop of Recordstore");
int recordID = re.nextRecordId();
System.out.println("Record ID==========================================="+recordID);
data = rs.getRecord(recordID);
System.out.println("Record Names are::::::::::::"+name);

}
Please Help me Out i am in mid of My project

Gopinath Karyadath
Ranch Hand

Joined: Oct 14, 2009
Posts: 87
Hi Rajesh

Are you working with Emulator ?? If please check the properties of your Emulator.
In real device it will work.


Regards
rajeshyadav mobi
Greenhorn

Joined: Apr 18, 2011
Posts: 25
Hi Gopinath,

Thanks for your Reply
yes, presently i am working on emulator.
The Code was working fine, all of sudden this exception javax.microedition.rms.RecordStoreNotFoundException is raised.
My Module of project is based on backend ( retriving the data stored in rms files) , every time insertion of new data may not reach my requirement.
Please Help me What to do furthur
Waiting for your reply.
Gopinath Karyadath
Ranch Hand

Joined: Oct 14, 2009
Posts: 87
Hi Rajesh

I dont know which Emulator is you using. In Nokia & Samsung Emulator , there is an option for delete RMS before starting Midlet.

I am always working with Nokia & Samsung.Your code will work in real Device.

Regards

Gopinath

rajeshyadav mobi
Greenhorn

Joined: Apr 18, 2011
Posts: 25
Hi

I found the solution

Remove "in.use" file from emulator path which in my computer is:
C:\Documents and Settings\Administrator\j2mewtk\2.5.2\appdb\DefaultColorPhone
Normally this file is absent. But when emulator is launched, this file is created so that if second instance of emulator is launched then it won't use the same folder. And during exit of the emulator, it is deleted. But if emulator is crashed and unable to do cleanup operations then this file sometimes remains. So, when you again launch the emulator, it thinks that this folder is already in use. So it creates a new temporary folder and delete it on exit.



Thanks
Rajesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I am not able to retrive the data from RecordStore of rms file
 
Similar Threads
Using ChoiceGroup.Implicit In Form (not midlet) of an applicaition
Deleting record from RecordStore
recordstore file's location in PC
Record Management store issue
calculate the amount values stored form recordstore in J2ME midlet