title: Couldn't read row 0, col -1 from CursorWindow
body: <p>I'm trying to get records in my table. I'm using this code</p>
  
  <pre><code>        if(c!=null){
              if(c.moveToFirst()) {
  
                  String tipId = c.getString(c.getColumnIndex(DAO.TIP_ID)).toString().trim();                 
                  System.out.println("tipId: "+ tipId);
  
              }else{
                  // Handle no rows returned
                  System.out.println("Handle no rows returned");
              }
          }else{
              System.out.println("debug Cursor , cannot be created");
          }
  </code></pre>
  
  <p>But it gives me the following exception</p>
  
  <pre><code>Couldn't read row 0, col -1 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
  </code></pre>
  
  <p>and it refers to that line:</p>
  
  <pre><code>String tipId = c.getString(c.getColumnIndex(DAO.TIP_ID)).toString().trim();
  </code></pre>
  
  <p>hope anyone helps me to fix this. 
  Thanks in advance.</p>