title: Android open or create database
body: <p>I am trying to create a database on my sd card. Whenever I call SQLiteDatabase.openOrCreateDatabase I get the error:</p>
  
  <blockquote>
    <p>07-21 13:33:17.587: ERROR/AndroidRuntime(5541): Caused by:
    android.database.sqlite.SQLiteException: unable to open database file</p>
  </blockquote>
  
  <p>Does anyone know what may be causing this?  Here is the code I have in the open() method of my database class:</p>
  
  <pre><code>File sdcard = Environment.getExternalStorageDirectory();
  
  String dbfile = sdcard.getAbsolutePath() + File.separator+ "external_sd" + File.separator + Schema.DATABASE_NAME ;
  
  db = SQLiteDatabase.openOrCreateDatabase(dbfile, null);
  </code></pre>