Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8698863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:48:59+00:00 2026-06-13T01:48:59+00:00

How do I iterate through all recordstore for a j2me app? The recordstore are

  • 0

How do I iterate through all recordstore for a j2me app?

The recordstore are created by the user when he enters some data.
So number of recordstore is not in my control.

So does the app keep track of all recordstore associated with a j2me app?
OR should I create a recordStore that will contain name of all other recordstores?

I can get all the row from a recordstore using

for(int i=1;i<=getnumrecords(RecordStoreName);i++)
RecordStoreName.getrecord(i);

But I am looking for such functionality for getting all the recordstore name associated with my app.

The reason I am creating a new RecordStore instead of a new row in one recordstore is because
the size of a recordstore in java me is limited by the phone.

So I have decided to create a new recordStore for every data I get from a form .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:49:00+00:00Added an answer on June 13, 2026 at 1:49 am

    If your user can remove entries from a RecordStore your loop will probably break because of an InvalidRecordIDException on the call to getRecord.
    A safer approach to iterate the records is to use a RecordEnumeration:

    RecordEnumeration re = RecordStoreName.enumerateRecords(null, null, false);
    
    while (re.hasNextElement()) {
        RecordStoreName.getrecord(re.nextRecordId());
    }
    

    Update after comments

    You can use static method listRecordStores. According to API:

    Returns an array of the names of record stores owned by the MIDlet
    suite. Note that if the MIDlet suite does not have any record stores,
    this function will return null. The order of RecordStore names
    returned is implementation dependent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for some code (C# or VB.NET preferred) to iterate through all folders
I'd like to iterate through all the rows in a gridview and retrieve data
In my ASP.NET MVC app I'm using a small helper to iterate through all
How would I iterate through all tabs a user has open and then check
I'm attempting to iterate through all User Profiles in SharePoint 2010 from a Silverlight
I need to iterate through all byte values (-128 to 127 inclusive). I could
I'm trying to iterate through all nodes, so I can print them out for
I'm trying to iterate through all the empty textboxes in a table and change
I want to iterate through all 5 character combinations of 0-9, a-z. I worked
I'm trying to iterate through all components and for those who implements ISupportsOpen allow

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.