In my application I need to add and edit data to the SQLite database. When I do update data function app do not give any errors but my database wont update. Here is my Updat
Your function returns 1; that's not ok... it should return ContentValues cv
return db.update(DATABASE_TABLE, cv, KEY_ROWID+"="+rowId, null)
There may be a problem in the update statement, Try:
long i = myDB.update(DATABASE_TABLE, cv, KEY_ROWID + "=?", new String[]{rowid});
if(i>0)
return 1; // 1 for successful
else
return 0; // 0 for unsuccessful
And yes go through the public int update (String table, ContentValues values, String whereClause, String[] whereArgs) function.