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 6679863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:24:30+00:00 2026-05-26T04:24:30+00:00

Now I try to write a small method to search in j2me, it works

  • 0

Now I try to write a small method to search in j2me, it works well but I don’t know how to write a method like SQL use “Like” in j2me to search recordstore doesn’t need match 100% percent.

Example

In my RecordStore there are 2 records

London; Paris; Atlanta;

Paramount; NewYork; Bronx;
  • When I type on TextField letter “o” it only shows last record

    Paramount; NewYork; Bronx
    although first record also has “London”

I learned how to write a search method from Java2s dot com

    http://www.java2s.com/Tutorial/Java/0430__J2ME/SearchrecordinRecordStore.htm

How to use “Like” in J2me?

  • 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-05-26T04:24:31+00:00Added an answer on May 26, 2026 at 4:24 am

    (expanding on what was discussed in question comments)

    Regarding your general question – the answer is no, MIDP 2 API has nothing like SQL LIKE. SQL expressions/statements cannot be used according to RecordStore API.

    The way to to search MIDP RecordStore for inexact match (similar to SQL LIKE) is to process the records using regular expressions. Note that regular expressions, in turn, are also not available in MIDP 2 API.

    To use regular expressions in MIDP, one would have to write own code for these, or better yet, get some library that does that, eg “regexp-me” open source package:

    “Java Me (j2me) regular expression package based on Jakarta Regexp. Regexp-me is CLDC1.0 compatible and has partial Unicode support”.


    As for the example SearchrecordinRecordStore.htm you mention, it looks like if you correctly ported it then you should get “London”.

    • I mean if your RecordFilter passes at strings containing “o” (case insensitive) and if you enumerated records using that filter then “London” should be there in the enumeration.
       
      Check if you somehow missed “London” when doing the output (btw original example seem to be targeted at displaying a single result). If you use emulator, consider using System.out.println – that way you could re-check the output not only with MIDlet UI but in emulator console.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am try to develop a small application. Now should i organize my 3rd
I try to write a dictionary extension for Google Chrome. Now, I want to
I have followed this tutorial here as mentioned exactly I now try to run
I'm learned php as functional and procedure language. Right now try to start learn
VS froze while I was using it, and now whenever I try to open
I created an iPhone project using the Core Data template. Now when I try
Third try at fixing this tonight - trying a different approach than before now.
It's now one week exactly that I try to port a simple activity-based app
I have started to try out noSQL databases now and are currently testing out
It's been now a long time since I try to figure out how to

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.