Advertisement

10.10.2007 at 11:30PM PDT, ID: 22886260
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

J2ME SQL Query : HOW

Tags: j2me, sql, rms
J2ME Filter Class
=============

Hi, i am a J2SE familiar with web development. I normally will use SQL Statement to query my database.

Now with J2ME's RMS system, i am stuck and lost on querying database.

This is my database structure in RMS.

Year|Month|Day|Expenses_Type|Expenses_Mode|Amount|Remark

 So, i wish to select certain record base on the condition something like this
SELECT * From [table_name] where Year ='XXX' and Month='YYY'

I have able to retrieve the entire record in RMS with this code:
..
..
            recordstore = RecordStore.openRecordStore("database_name", true);
            byte[] byteInputData = new byte[500];
            ByteArrayInputStream inputStream = new ByteArrayInputStream(byteInputData);
            DataInputStream inputDataStream = new DataInputStream(inputStream);

            for (int x = 1; x <= recordstore.getNumRecords(); x++) {
                recordstore.getRecord(x, byteInputData, 0);
                input_id = inputDataStream.readInt();
                input_year = inputDataStream.readUTF();
                input_month = inputDataStream.readUTF();
                input_type = inputDataStream.readUTF();
           }
..
..

I have also read the J2ME Filter in here http://www.java2s.com/Code/Java/J2ME/Demonstratessimplerecordsortingandfiltering.htm
and i notice it's only able to search a single phrase or column only. So, not able to match what i want.

Thus, this is my question.

1. How can i preform similar operation (SELECT Query) in J2ME RMS database? Is there any other way for me to achieve the above SQL statement?
2. The Filter option from J2me, am i right that it's only useful when you wish to search a single text ONLY?
3. Can you suggest any other useful URL for my as a reference code? I am a beginner in J2ME and notice it's kind of "restricted" as mostly many classes is not available.

Thank you.

Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: taiping
Solution Provided By: keyurkarnik
Participating Experts: 4
Solution Grade: B
Views: 77
Translate:
Loading Advertisement...
10.25.2007 at 12:33AM PDT, ID: 20145707

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
10.30.2007 at 02:31AM PDT, ID: 20175542

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
10.30.2007 at 04:52AM PDT, ID: 20176135

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
11.13.2007 at 05:35PM PST, ID: 20276992

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
12.05.2007 at 03:27AM PST, ID: 20410381

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29 / EE_QW_1_20070628