【发布时间】:2023-01-21 01:58:46
【问题描述】:
我编写了以下查询,该查询在 Api 29 和 30 上运行良好,但应用程序仅在 Api 28 上崩溃,日志如下 System.out: crash_report=Exception is: android.database.sqlite.SQLiteException: no such column: true (代码 1 SQLITE_ERROR): , 编译时: update doctor set is_rogspFiled = true where doctor_contactid = 784829 这是我的查询。我需要改变什么?
query = " update " + TABLE_DOCTOR + " set " + Queryclass.DOCTOR_ROGSP_STATUS + " = " + isFiled + " where " + Queryclass.DOCTOR_CONTACTID + " = " + gspid ;
cursor = sd.getData(query);
if (cursor.moveToNext()) {
isFiled = true;
ContentValues contentValues = new ContentValues();
contentValues.put(Queryclass.DOCTOR_ROGSP_STATUS, isFiled);
sd.update(Queryclass.TABLE_DOCTOR, contentValues, query);
}
cursor.close();
sd.close();
【问题讨论】:
标签: android android-sqlite android-database android-api-levels sqliteexception