public int updateScoreBoard(ScoreBoard scoreBoard) { ContentValues cv = new ContentValues(); cv.put(SCOREBOARD_GROUPNAME, scoreBoard.getGroupName()); cv.put(SCOREBOARD_CLASSNAME, scoreBoard.getClassName()); cv.put(SCOREBOARD_SCORE, scoreBoard.getScore()); cv.put(SCOREBOARD_TIME, scoreBoard.getTime()); String where = SCOREBOARD_ID + "= ?"; String[] whereArgs = {String.valueOf(scoreBoard.getId())}; this.openWriteableDB(); int rowCount = db.update(SCOREBOARD_TABLE, cv, where, whereArgs); this.closeDB(); return rowCount; }