[Solved] Missing Syntax for displaying data in listview [duplicate]

You are getting null object exception because you have not initialise SQLiteDatabase before do operation Just need to replace your method public void executeEventInsert(String name, String score){ //For write data to your database SQLiteDatabase db = this.getWritableDatabase(); String query=”INSERT INTO universityFinder(univName, score) VALUES(‘”+name+”‘,'”+score+”‘);”; db.execSQL(query); } and public ArrayList<HashMap<String,String>> executeSelectEvents(int input){ String query=”select * from “+TABLE_NAME+ … Read more