1

NullPointerException error when trying to read from SQLite

view story
linux-howto

http://stackoverflow.com – I found this source code from a tutorial but it crashes when I run it. My logcat: 01-24 00:34:13.746: E/AndroidRuntime(4622): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.pinchtapzoom/com.pinchtapzoom.AssignmentTracker}: java.lang.NullPointerException 01-24 00:34:13.746: E/AndroidRuntime(4622): Caused by: java.lang.NullPointerException This is where the code starts to crash: //---retrieves all the records--- public Cursor getAllRecords() { db = DBHelper.getWritableDatabase(); Cursor mCursor = db.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_T (HowTos)