//更新数据库中的记录
ContentValues cv = new ContentValues();
cv.put(Body.HTML_Content, newHtmlBody);
//first是需要查找的列名
String where = Body.Message_Key + "=" + mMessageId;
getContentResolver().update(Body.CONTENT.URI, cv, where, null);
ContentValues cv = new ContentValues();
cv.put(Body.HTML_Content, newHtmlBody);
//first是需要查找的列名
String where = Body.Message_Key + "=" + mMessageId;
getContentResolver().update(Body.CONTENT.URI, cv, where, null);
//上面方法的一个参数是表名,second列名与值,third行,fourth可以为null
http://zhidao.baidu.com/question/6119857.html?fr=qrl&cid=905&index=1
本文介绍了一种更新数据库中特定记录的方法,使用ContentValues对象存储新的HTML内容,并通过定义where条件来定位待更新的数据。
284

被折叠的 条评论
为什么被折叠?



