0
我是新來開發Android,而我在listview
頭版開發記事本應用程序中包含的筆記標題,我想更新,並從listview
刪除行項目:如何從SQLitedatabase更新和刪除行?
public void Update(String txt)
{
ContentValues upateValues = createContentValues(txt);
db.update(table_name, upateValues, row + "="+ "a", null);
Toast.makeText(this, "Record Updated", Toast.LENGTH_SHORT).show();
}
public void Delete()
{
db.delete(table_name, "row" +"="+"jmj", null);
Toast.makeText(this, "Record Deleted", Toast.LENGTH_SHORT).show();
//Display();
}
這是查詢正確的更新和刪除操作?