我想使用下面的代码,但我无法更新我的表。更新表无法正常工作
db = dbHelper.getWritableDatabase();
int i = 1;
String updateStatement = "update "+MESSAGE_TABLE+" SET status ="+i+" where message_id = "+message_id;
SQLiteStatement update;
update = db.compileStatement(updateStatement);
update.executeInsert();
相反的update.executeInsert()
,我也试过update.executeI()
,但它也不能工作。
如果将错误它将帮助别人诊断问题 –
在日志猫它显示的数据被更新的logcat的输出。但是当我从表中检索数据...数据没有更新 –
你确定executeUpdateDelete()的返回值是1吗? –