我收到提示:SQLite的例外尝试删除行
android.database.sqlite.SQLiteException: near ":BE": syntax error (code 1): , while compiling: DELETE FROM device WHERE address=C4:BE:84:18:D5:A5
,同时试图从SQLite数据库中删除的行。
public int removeDevice(String address) {
open();
int removedId = database.delete(MySQLiteHelper.TABLE_DEVICE
, MySQLiteHelper.KEY_ADDRESS + "=" + address, null);
close();
return removedId;
}
我找不出什么问题。
是'address'一个字符串?需要引用字符串 –
@VladMatvienko是的,确实如此:这是一个MAC地址。 –