title: how to access database sqlite in android
body: <p>Due to your solutions I have finished my application, I came here for last question about my current application, the database I created I am not able to access it, I read that is within the system of android  so what should I do to access the database and export it ?  </p>
  
  <pre><code> public class DBAdapter {
   private static final String DATABASE_NAME = "bd";
   private static final int DATABASE_VERSION = 3;
   private final Context context;
   private static DatabaseHelper  DBHelper;
   private SQLiteDatabase db;
   static String SqlCreate = "CREATE TABLE password(id INTEGER, name TEXT, password TEXT)";
   public DBAdapter(Context ctx) {
       this.context = ctx;
       DBHelper = new DatabaseHelper(context);
   }
  
   public void onOpen(SQLiteDatabase db) {
  db = DBHelper.getWritableDatabase();
  // super.onOpen(db);
   if (!db.isReadOnly()) {
   // Enable foreign key constraints
   db.execSQL("PRAGMA foreign_keys=ON;");
   }
   }
  private static  class DatabaseHelper extends  SQLiteOpenHelper {
        DatabaseHelper (Context context) {
           super(context,DATABASE_NAME,null,DATABASE_VERSION);
        }
     public void onCreate(SQLiteDatabase db) {
      try {
             db.execSQL(DATABASE_CREATE1);
             db.execSQL(DATABASE_CREATE3);
             db.execSQL(SqlCreate);
            // db.execSQL(DATABASE_CREATE2);
  
          }  
          catch(SQLException e) {
          e.printStackTrace();
          }
     }
  </code></pre>