簡體   English   中英

調用database.rawQuery時的Android SQLiteMisuseException

[英]Android SQLiteMisuseException when calling database.rawQuery

我在Android應用程序中使用SQLite數據庫,有時在調用database.rawQuery(String sql,String [] selectionArgs)時會得到SQLiteMisuseException。 這很奇怪,因為這個例外似乎是ramdomly,我真的不知道為什么。

有關異常的更多信息:

android.database.sqlite.SQLiteMisuseException: library routine called out of sequence: , while compiling: SELECT PromoGuid, PromoViewCount FROM TablePromoView
at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method)
at android.database.sqlite.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:92)
at android.database.sqlite.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:65)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:83)
at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:49)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:42)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1356)
at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1324)
at com.my.application....

有人有這個錯誤嗎? 你能幫我解決一下嗎?

提前致謝,

PS:對不起,我的英語很差,我來自比利時

檢查此鏈接 確保在開始其他活動之前關閉所有打開的數據庫連接/游標等。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM