我正在从sqlite表中删除一行,而行在我做错的地方没有删除 请建议我。
public void deleteBName(String id)
{
// TODO Auto-generated method stub
SQLiteDatabase db = this.getWritableDatabase();
db.delete(EmergencyTable, colID + "=" + id, null);
}
答案 0 :(得分:0)
试试这个:
//---deletes a particular title---
public boolean deleteTitle(String name)
{
return db.delete(DATABASE_TABLE, KEY_NAME + "=" + name, null) > 0;
}
-
public void deleteBName(String id)
{
// TODO Auto-generated method stub
SQLiteDatabase db = this.getWritableDatabase();
return db.delete(EmergencyTable, colID + "=" + id, null);
}
答案 1 :(得分:0)
也许您的EmergencyTable或colID错误....