1. Download our Official Android App: Forums for Android!

Apps SQLite No Such Table

Discussion in 'Android Development' started by __Jon__, Sep 26, 2010.

  1. __Jon__

    __Jon__ Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    15
    Joined:
    Aug 16, 2010

    Aug 16, 2010
    15
    0
    15
    I'm trying to opena database and perform searches of it. It's a prebuilt SQLite DB which I put into assets directory and used the SQLiteOpenHelper class to open it up.

    Now I want to perform querys but I keep getting No Such Table errors, and after trying any number of permutations of searches I am at a loss. I don't know what is wrong.
    I prefer doing rawQuery since I know a little SQL anyway. This is what I did, after opening the DB:
    Code (Text):
    1. SQLiteDatabase MyDb = NewDbHelper.getReadableDatabase();
    2.   String selection = "SELECT Wordlink FROM Questions WHERE Level = 3";
    3.   Cursor c = MyDb.rawQuery(selection,null);
    Anyone had similar problems or know what to do?
     

    Advertisement

  2. vladimirov

    vladimirov Newbie
    Rank:
    None
    Points:
    16
    Posts:
    17
    Joined:
    Apr 26, 2010

    Apr 26, 2010
    17
    2
    16
    Can you post here a source code of NewDbHelper class?
     
  3. __Jon__

    __Jon__ Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    15
    Joined:
    Aug 16, 2010

    Aug 16, 2010
    15
    0
    15
    Thanks for your reply. Thankfully just today I fixed the problem. Rather embrassing really, I put the wrong suffix onto the database name. Ooops.
     

Share This Page

Loading...