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

Right now we just use something like this stopWatch.Start(); try { method(); } finally
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 used to work with VWD and now I try to install the new
I recently upgraded my oracle client to 10g (10.2.0.1.0). Now when I try to
I created an iPhone project using the Core Data template. Now when I try
So I have this regex: (^(\s+)?(?P<NAME>(\w)(\d{7}))((01f\.foo)|(\.bar|\.goo\.moo\.roo))$|(^(\s+)?(?P<NAME2>R1_\d{6}_\d{6}_)((01f\.foo)|(\.bar|\.goo\.moo\.roo))$)) Now if I try and do a match
Third try at fixing this tonight - trying a different approach than before now.
I have started to try out noSQL databases now and are currently testing out
I am now hacking an old C code, try to make it more C++/Boost

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.