title: Failed to read row 0, column 1 from a CursorWindow (Android)
body: <p>I have created a table like <code>Players</code> in onCreate() method which is in MySQLiteHelper.java:</p>
  <pre><code>String CREATE_PLAYERS_TABLE = &quot;CREATE TABLE Players 
  (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, password TEXT, score INTEGER)&quot;;
  
  db.execSQL(CREATE_PLAYERS_TABLE);
  </code></pre>
  <p>And I have an update method in the same class like:</p>
  <pre><code>public int PlayerUpdate(Player PL) {
  
      // 1. get reference to writable DB
      SQLiteDatabase db = this.getWritableDatabase();
  
      // 2. create ContentValues to add key &quot;column&quot;/value
      ContentValues values = new ContentValues();
      values.put(&quot;name&quot;, PL.getName());
      values.put(&quot;password&quot;, PL.getPassword());
      values.put(&quot;score&quot;, PL.getScore());
  
      // 3. updating row
      int i = db.update(TABLE_Players, // table
              values, // column/value
              KEY_ID + &quot; = ?&quot;, // selections
              new String[] { String.valueOf(PL.getId()) }); // selection args
  
      // 4. close
      db.close();
  
      return i;
  }
  </code></pre>
  <p>and when I call functions to change <code>score</code> variable as:</p>
  <pre><code>public void scoreUp() {
      helper.PlayerUpdate(new Player(player_name,player_password,player_score+5));
  }
  public void scoreDown() {
      helper.PlayerUpdate(new Player(player_name,player_password,player_score-5));
  }
  </code></pre>
  <p>I am getting a logcat error like:</p>
  <pre><code>Failed to read row 0, column 1 from a CursorWindow which has 1 rows, 1 columns.
  FATAL EXCEPTION: main
  java.lang.IllegalStateException: Could not execute method of the activity
  Caused by: java.lang.IllegalStateException: Couldn't read row 0, col 1 from CursorWindow.  
  Make sure the Cursor is initialized correctly before accessing data from it.
  </code></pre>
  <p>Thanks.</p>
  <h2>SOLVED:</h2>
  <p>There has been another query that causes this specific exception and I found out.</p>