android - how to use of update operation sqlite? -


i have problem sqlite update operation, please me how fix database handler update data :

public int updateaccountcalc(accounts accounts) {          sqlitedatabase db = this.getwritabledatabase();            contentvalues values = new contentvalues();          values.put(key_id, accounts.getid());          values.put(key_nama, accounts.getnama());          values.put(key_email, accounts.getemail());          values.put(key_bb0, accounts.getbb0());          values.put(key_bb1, accounts.getbb1());          values.put(key_bb2, accounts.getbb2());          values.put(key_bb3, accounts.getbb3());          values.put(key_lila, accounts.getlila());            // updating row          return db.update(table_name, values, key_id + " = ?",                  new string[] { string.valueof(accounts.getid()) });      }

and code use :

db.updateaccountcalc(new accounts(0, nama.tostring(), email.tostring(), bb, 0, 0, 0, lila));

i have inserted value of bb, never updated on sqlite database


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -