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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:32:07+00:00 2026-05-27T08:32:07+00:00

I know my question is very simple, I am trying to work out this

  • 0

I know my question is very simple, I am trying to work out this rawQuery for hour, any help will be highly appreciated…

String queryString = "SELECT _id FROM " +  TABLE_SELECTED_ONE + " WHERE DifficultyLevel=? AND Attempt=?"; 
    Cursor cursor = Db.rawQuery(queryString, new String[] {beginnerOrAdvanced, "no"} );

but it crashes

12-08 02:18:33.091: ERROR/AndroidRuntime(546): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wissenways.practicequestion/com.wissenways.practicequestion.QuesBankSelect}: android.database.sqlite.SQLiteException: near ".": syntax error: , while compiling: SELECT _id FROMQuantQuesBank1WHEREQuantQuesBank1.DifficultyLevel='beginner' ANDQuantQuesBank1.Attempt ='no'
  • 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-27T08:32:07+00:00Added an answer on May 27, 2026 at 8:32 am

    I never got args to work in all the apps I published, try

    Db.rawQuery(queryString, null);
    

    and build up your string in it’s full state as a pure string

    example :

    String dateString = Utils.makeDateString(mCalDate);
    String sqlQuery = "select * from table where entrydate = '" + dateString + "'";
    
    mSearchCursor = db.rawQuery(sqlQuery, null);
    

    That way you can always run the SQL query in a SQL browser app on the table (extract from phone via DDMS) and check it works outside of Android.

    It’s just the output looks very wrong and spaces have been removed that were essential

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

Sidebar

Related Questions

This may be very simple question,But please help me. i wanted to know what
I know this is probably a very simple question but how would I do
Warning - I am very new to NHibernate. I know this question seems simple
I know this is a darn simple question, but I'm very used to using
Okay, this is (probably) a very simple question, but I am afraid I know
I know this is a very simple question but I seem to be having
I know this is a very simple question but I have been struggling with
I know this is probably a very simple question, but I can't seem to
guys I know this question is very basic but I've met in few publications
Introduction: Now I know this question could be very broad and it would be

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.