title: Getting all records from sqlite android
body: <p>I am creating a database and I need to read all records from the database, but my program keeps crashing at this statement:</p>
  
  <pre><code>newWord= db.getAllRecords();
  </code></pre>
  
  <p>I assume there is an issue with getAllRecords(), as Eclipse indicates no errors.</p>
  
  <pre><code> public Cursor getAllRecords() {
   db = dBHelper.getWritableDatabase();//obtains the writable database
  return db.query(DATABASE_TABLE, new String[] { KEY_ROWID,KEY_WORD}, null, null, null,      null, null);//the query used to obtain all records form the table
  
  } 
  </code></pre>
  
  <p>Any ideas?</p>