title: Failed to read row 0, column 4 from CursorWindow, which has 1 row and 4 columns
body: <p>I'm trying to make an SQLite database and all seems okay until I add "profileWeight" in the list. I have tried to look into other samples but all are different from mine. Can anybody help me with this. The code for my DBController.java is as below:</p>
  
  <pre><code>public class DBController extends SQLiteOpenHelper {
  private static final String LOGCAT = null;
  
  public DBController(Context applicationcontext) {
      super(applicationcontext, "profiledatabase.db", null, 1);
      Log.d(LOGCAT, "Created");
  }
  
  @Override
  public void onCreate(SQLiteDatabase database) {
      String query = "CREATE TABLE profiles ( profileId INTEGER PRIMARY KEY, profileName TEXT, "
              + "profileDOB DATE, profileSex TEXT, profileWeight TEXT)";
      database.execSQL(query);
      Log.d(LOGCAT, "profiles Created");
  }
  
  @Override
  public void onUpgrade(SQLiteDatabase database, int version_old,
          int current_version) {
      String query;
      query = "DROP TABLE IF EXISTS profiles";
      database.execSQL(query);
      onCreate(database);
  }
  
  public void insertProfile(HashMap&lt;String, String&gt; queryValues) {
      SQLiteDatabase database = this.getWritableDatabase();
      ContentValues values = new ContentValues();
      values.put("profileName", queryValues.get("profileName"));
      values.put("profileDOB", queryValues.get("profileDOB"));
      values.put("profileSex", queryValues.get("profileSex"));
      values.put("profileWeight", queryValues.get("profileWeight"));
  
      database.insert("profiles", null, values);
      database.close();
  }
  
  public int updateProfile(HashMap&lt;String, String&gt; queryValues) {
      SQLiteDatabase database = this.getWritableDatabase();
      ContentValues values = new ContentValues();
      values.put("profileName", queryValues.get("profileName"));
      values.put("profileDOB", queryValues.get("profileDOB"));
      values.put("profileSex", queryValues.get("profileSex"));    
      values.put("profileWeight", queryValues.get("profileWeight"));      
  
      return database.update("profiles", values, "profileId" + " = ?",
              new String[] { queryValues.get("profileId")});
      // String updateQuery =
      // "Update  words set txtWord='"+word+"' where txtWord='"+ oldWord +"'";
      // Log.d(LOGCAT,updateQuery);
      // database.rawQuery(updateQuery, null);
      // return database.update("words", values, "txtWord  = ?", new String[]
      // { word });
  }
  
  public void deleteProfile(String id) {
      Log.d(LOGCAT, "delete");
      SQLiteDatabase database = this.getWritableDatabase();
      String deleteQuery = "DELETE FROM profiles where profileId='" + id
              + "'";
      Log.d("query", deleteQuery);
      database.execSQL(deleteQuery);
  }
  
  public ArrayList&lt;HashMap&lt;String, String&gt;&gt; getAllProfiles() {
      ArrayList&lt;HashMap&lt;String, String&gt;&gt; wordList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
      String selectQuery = "SELECT  * FROM profiles";
      SQLiteDatabase database = this.getWritableDatabase();
      Cursor cursor = database.rawQuery(selectQuery, null);
      if (cursor.moveToFirst()) {
          do {
  
              HashMap&lt;String, String&gt; profileMap = new HashMap&lt;String, String&gt;();
              profileMap.put("profileId", cursor.getString(0));
              profileMap.put("profileName", cursor.getString(1));
              profileMap.put("profileDOB", cursor.getString(2));
              profileMap.put("profileSex", cursor.getString(3));
              profileMap.put("profileWeight", cursor.getString(4));
  
              wordList.add(profileMap);
  
          } while (cursor.moveToNext());
      }
  
      // return contact list
      return wordList;
  }
  
  public HashMap&lt;String, String&gt; getProfileInfo(String id) {
      HashMap&lt;String, String&gt; wordList = new HashMap&lt;String, String&gt;();
      SQLiteDatabase database = this.getReadableDatabase();
      String selectQuery = "SELECT * FROM profiles where profileId='" + id
              + "'";
      Cursor cursor = database.rawQuery(selectQuery, null);
      if (cursor.moveToFirst()) {
          do {
              // HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
              wordList.put("profileId", cursor.getString(0));             
              wordList.put("profileName", cursor.getString(1));
              wordList.put("profileDOB", cursor.getString(2));
              wordList.put("profileSex", cursor.getString(3));    
              wordList.put("profileWeight", cursor.getString(4));                 
  
              // wordList.add(map);
          } while (cursor.moveToNext());
      }
      return wordList;
  }
  }
  </code></pre>