title: SQLite test activity receives error
body: <p>I'm learning SQLite, and I've written the following class</p>
  
  <pre><code>SQLiteTestActivity (Context context) { 
      super(context, DATABASE_NAME, null, DATABASE_VERSION);
  }// end of
  
  @Override
  public void onCreate(SQLiteDatabase db) {
      // TODO Auto-generated method stub
      db.execSQL("CREATE TABLE" + MP_TABLE_NAME + " ( " +
              BaseColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
              " name TEXT, " +
              " lat REAL, "+
              " lng REAL,"+
              " roll REAL,"+
              " pitch REAL,"+
              " yaw REAL,"+
              " path TEXT"+
              ");" );
  }
  
  @Override
  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
      // TODO Auto-generated method stub
  
  }
  
  public Double[] getMP_RPY(long id) {
      SQLiteDatabase db = this.getReadableDatabase();
      SQLiteCursor c = (SQLiteCursor) db.rawQuery("SELECT roll,pitch,yaw FROM MP_Data WHERE "+
                                                  BaseColumns._ID+"="+
                                                  Long.toString(id), null);
      c.moveToFirst();
      Double[] r = { c.getDouble(0), c.getDouble(1), c.getDouble(2) };
      return r;       
  }
  
  public Double[] getMP_Coor(long id) {
      SQLiteDatabase db = this.getReadableDatabase();
      SQLiteCursor c = (SQLiteCursor) db.rawQuery("SELECT lat, lng FROM MP_Data WHERE "+
                                                  BaseColumns._ID+"="+
                                                  Long.toString(id), null);
      c.moveToFirst();
      Double[] r = { c.getDouble(0), c.getDouble(1)};
      return r;       
  }
  
  public String[] getMP_Name(long id) {
      SQLiteDatabase db = this.getReadableDatabase();
      SQLiteCursor c = (SQLiteCursor) db.rawQuery("SELECT name FROM MP_Data WHERE "+
                                                  BaseColumns._ID+"="+
                                                  Long.toString(id), null);
      c.moveToFirst();
      String[] r = { c.getString(0)};
      return r;       
  }
  
  public void deleteMP(long id) {
      SQLiteDatabase db = this.getWritableDatabase();
      db.delete(MP_TABLE_NAME, BaseColumns._ID+"="+Long.toString(id),null);   
  }
  </code></pre>
  
  <p>as well as the following  activity:</p>
  
  <pre><code>public class SQLSaveData extends Activity{
  
  EditText et01, et02;
  Button btn;
  SQLiteTestActivity mphelper;
  SQLiteDatabase db ;
  ContentValues cv;
  
  OnKeyListener et01Listener = new OnKeyListener() {
  
      @Override
      public boolean onKey(View v, int keyCode, KeyEvent event) {
          // TODO Auto-generated method stub
  
          if ( (event.getAction() == KeyEvent.ACTION_DOWN) &amp;&amp;
                ( keyCode == KeyEvent.KEYCODE_ENTER ) ) {
  
              save("name", et01.getText().toString());
  
              return true;
          }
          return false;
      }
  };
  
  OnKeyListener et02Listener = new OnKeyListener() {
  
      @Override
      public boolean onKey(View v, int keyCode, KeyEvent event) {
          // TODO Auto-generated method stub
  
          if ( (event.getAction() == KeyEvent.ACTION_DOWN) &amp;&amp;
                    ( keyCode == KeyEvent.KEYCODE_ENTER ) ) {
  
              save("lat", et02.getText().toString()); 
                  return true;
              }
          return false;
      }
  };
  
  
  public void save(String key, String value)
  {
      cv.put(key, Double.valueOf(value));
      long newID = db.insert("MPDetails", null, cv);
  }
  
  @Override    
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      et01 = (EditText) findViewById(R.id.et01);
      et02 = (EditText) findViewById(R.id.et02);
      btn = (Button) findViewById(R.id.btn01);
  
      mphelper = new SQLiteTestActivity(this);
      db =  mphelper.getWritableDatabase();
      cv = new ContentValues();
  
      et01.setOnKeyListener(et01Listener);
      et02.setOnKeyListener(et02Listener);
  }
  </code></pre>
  
  <p>but I always receive error reads " the App. Stopped Unexpectedly ";
  when I disable"comment" the following three lines:
  the APP. doesnt give that error, but when I enable the following three lines 
  it crashs</p>
  
  <pre><code>    mphelper = new SQLiteTestActivity(this);
      db =  mphelper.getWritableDatabase();
      cv = new ContentValues();
  </code></pre>