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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:32:21+00:00 2026-06-07T21:32:21+00:00

when I try to request informations from my sqlite database I get this error:

  • 0

when I try to request informations from my sqlite database I get this error:

07-19 02:17:10.835: E/AndroidRuntime(689): java.lang.RuntimeException: Unable to start activity ComponentInfo{de.bodprod.dkr/de.bodprod.dkr.MediNotmediList}: java.lang.IllegalArgumentException: You must supply an SQL string

My Database Request:

public ArrayList<HashMap<String,Object>> getAllNotmedis(){
    ArrayList<HashMap<String,Object>> notmediList = new ArrayList<HashMap<String,Object>>();
    String selectQuery = "SELECT medi_id, medi_wirk, medi_handel FROM dkr_medi_liste ORDER BY medi_wirk";
    Log.d("ALLNOTMEDIS",selectQuery);
    SQLiteDatabase db = this.getWritableDatabase();
    Cursor cursor = db.rawQuery(selectQuery, null);
    HashMap<String , Object> notmedi_item;
    if (cursor.moveToFirst()) {
        do {
            notmedi_item = new HashMap<String, Object>();
            notmedi_item.put("sql_id", Integer.parseInt(cursor.getString(0)));
            notmedi_item.put("wirk", cursor.getString(1));
            notmedi_item.put("handel", unescape(cursor.getString(2)));
            notmediList.add(notmedi_item);
        } while (cursor.moveToNext());
    }
    cursor.close();
    db.close();
    return notmediList;
} 

This line make the error:

    SQLiteDatabase db = this.getWritableDatabase();

Why I become this error? The database exist and is filled up with data…

  • 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-06-07T21:32:22+00:00Added an answer on June 7, 2026 at 9:32 pm

    The error was in the onCreate section.

    I tried to insert a blank line with db.execSQL.

    I get the error on this line becaause SQLiteDatabase db = this.getWritableDatabase(); calls the onCreate method.

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

Sidebar

Related Questions

When I try to get something from local sqlite or from ajax request I
I try to send a request to my server via GET, but qooxdoo sends
I am getting this error when I try to send via the local server
Can I get information from which web site is came request to read XML
I have tried switching from a previous Post request to a Get request. Which
I didn't get any responses from the asp.net forum, so I thought I'd try
i want to add ?orderBy=countryasc to my current url. I try with Request.Url but
I try to perform a simple POST-request with urllib2. However the servers response indicates
I'm try to redirect any request to mydomain.com/video/(.*) to video.mydomain.com/$1. I have the following
I try to iterate throug an array of ids and make a ajax request

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.