• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Your mother was a hamster and your father was a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic