title: SQLite table does not exist exception for existing SQLite database (and table)
body: <p>I've followed the instructions given <a href="http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/" rel="nofollow">here</a> for introducing an existing SQLite database to your Android app.</p>
  
  <p>When I query the table "android_metadata" this is fine. But when I run a similar query on my own table "words" (which has _id for primary integer key) I get a table does not exist exception and the app crashes.</p>
  
  <p>Why is that?</p>
  
  <p>Code:</p>
  
  <pre><code>Cursor c = myDatabase.query("android_metadata", null, null, null, null, null, null, null);
  </code></pre>
  
  <p>works but</p>
  
  <pre><code>Cursor c = myDatabase.query("words", null, null, null, null, null, null, null);
  </code></pre>
  
  <p>returns a table does not exist exception.</p>
  
  <p>This is how I'm creating the database (the references to paths and filenames are correct):</p>
  
  <pre><code>private void copyDatabase() throws IOException
  {
      //Open local db as the input stream
      InputStream myInput = mContext.getAssets().open(DB_NAME);
  
      //Path to the just created empty db
      String outFileName = DB_PATH + DB_NAME;
  
      //Open the empty db as the output stream
      OutputStream myOutput = new FileOutputStream(outFileName);
  
      //Transfer bytes from the inputfile to the outputfile
      byte[] buffer = new byte[1024];
      int length = 0;
      while ((length = myInput.read(buffer))&gt;0){
          myOutput.write(buffer, 0, length);
      }
  
      //Close the streams
      myOutput.flush();
      myOutput.close();
      myInput.close();
  }
  </code></pre>
  
  <p>(Note: To my eyes, the table is there. I'm looking right at it in my SQLite browser.)</p>