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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:49:50+00:00 2026-05-21T22:49:50+00:00

I keep trying to use wildcards in a search in an android app, and

  • 0

I keep trying to use wildcards in a search in an android app, and keep running into errors.

I’m performing a search on my application using the string below:

Cursor c_name = b.query("namedrxns", new String[] { "_id", "name" },
              "name LIKE %?%", new String[] { query }, null, null, null);

when I use name LIKE %?% or name=%?% I get a “near “%”: syntax error: , while compiling: SELECT _id, name FROM namedrxns WHERE name=%?%” error.

but with name LIKE '%?%' or name='%?%' I get instead “bind or column index out of range: handle 0x40cb70”

Could someone please tell me what I’m doing wrong?

Thanks!

  • 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-21T22:49:50+00:00Added an answer on May 21, 2026 at 10:49 pm

    Append the % to the query parameter.

    I.E.:

    Cursor c_name = b.query("namedrxns", new String[] { "_id", "name" },
              "name LIKE ?", new String[] { "%"+query+"%" }, null, null, null);
    

    Like Thomas Mueller already said, please note that % and _ within the value still work as wildcards.

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

Sidebar

Related Questions

I'm trying to use a MySQL database with EclipseLink using Netbeans but I keep
I'm currently struggling to use UI elements in Interface Builder. I keep trying to
Im trying to use Date Formatters (NSDateFormatter), but I keep getting this error: Program
I'm trying to use the CRT memory leak detection but I keep getting the
I'm trying to use slime from CVS (2009-01-05) but keep getting this error: LOAD:
I'm trying to use this php thumbnail generator http://phpthumb.gxdlabs.com/ and i keep getting the
I'm just trying to use some basic Isolated Storage functionality and I keep getting
I'm trying to use SHFHKeychainUtils in my project, but I keep getting the following
I am trying to use Rhino Mocks to mock the following lambda, but keep
I'm trying to use the Google Maps geocoder with Python and JSON, but keep

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.