title: SqLite in Android. Everything was working but suddenly an error arose
body: <p>java.lang.IllegalStateException: Couldn't read row 30, col 9 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>Cursor cursor = dataBase.query("MyBooks", null, null, null, null, null, "COLUMN_LAST_OPEN");
  cursor.moveToFirst();
  if (!cursor.isAfterLast()) {
      do {
          path = cursor.getString(9); //exception arises here
  
      } while (cursor.moveToNext());
  }
  </code></pre>
  
  <p>Exception arises on the cursor Position 122 although exception says that row is 30. If I'd change the code to iterate from the end to start by calling cursor.moveToPrevious then it's working.</p>