title: SQLite "no such table"
body: <p>I've made an Adnroid program in Eclipse that reads a csv file and inputs the info into an SQLite database, and using</p>
  
  <pre><code>dbCursor = database.query(DATABASE_TABLE, new String[]{KEY_ROWID, KEY_ITEMTYPE, KEY_QUANTITY},  null, null, null, null, null);  
  
      int iRow = dbCursor.getColumnIndex(KEY_ROWID);
      int iType = dbCursor.getColumnIndex(KEY_ITEMTYPE);
      int iQuantity = dbCursor.getColumnIndex(KEY_QUANTITY);
  
          for(dbCursor.moveToFirst(); !dbCursor.isAfterLast(); dbCursor.moveToNext()){
              allData = allData + " " + dbCursor.getString(iRow) + "\t " + dbCursor.getString(iType) + "\t\t\t " + dbCursor.getString(iQuantity) + "\n";      
          }
  </code></pre>
  
  <p>and then printing out allData in a textview box has worked just fine.</p>
  
  <p>Then I wanted to use </p>
  
  <pre><code>dbCursor = database.rawQuery("SELECT KEY_ROWID , SUM(KEY_ITEMTYPE) FROM DATABASE_TABLE GROUP BY KEY_ROWID", null);          
  for(dbCursor.moveToFirst(); !dbCursor.isAfterLast(); dbCursor.moveToNext()){
  
      allDataSum = allDataSum + " " + dbCursor.getString(0);
  } //I know this will probably not print what I want correctly but that's a problem for another day
  </code></pre>
  
  <p>When I try to print this I get the error "10-25 22:06:35.016: I/Database(1911): sqlite returned: error code = 1, msg = no such table: DATABASE_TABLE". </p>
  
  <p>I then opened DDMS File Explorer and copied the database onto my desktop and then tried viewing the database with a command tool but again got an error, "SQL error: no such table: inventory".</p>
  
  <p>How can the emulator show me what I want to see from .query() (but not from .rawQuery) when apparently there is no table in the database? Everything about I use the query and rawQuery is identical, so it's not a case of not opening the db for rawQuery or something like that. </p>