如何在android Sqlite数据库中处理有争议的查询

时间:2016-01-07 09:21:29

标签: android sqlite

我将根据学生注册ID

不断删除学生记录

我有1000个ID,我正在连续删除,如下所示..

for (int j = 0; j < feeDetailsArrayList.size(); j++) {
               FeeDetails feeDetails = feeDetailsArrayList.get(j);
                           dbHelper.deleteFeeDetailsTableRecords(feeDetails.getStudentEnrollmentId());
        }

public  void deleteFeeDuesTableRecords(String studentEnrollmentId){

    SQLiteDatabase db = this.getWritableDatabase();
    String selectQuery = "delete from "+ STUDENT_FEE_DUES_TABLE +" where "+ KEY_STUDENT_ENROLLMENT_ID + "  = " + "'" + studentEnrollmentId + "'";
    Cursor cursor = db.rawQuery(selectQuery, null);


}

会显示以下错误

fillWindow() exception unable to open database file (code 14)
android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14)
at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method)
at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:854)
at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)

我无法追踪的问题是什么,任何人都可以指导我 您的回复将不胜感激。

0 个答案:

没有答案