Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了调用database.rawQuery时的Android SQLiteMisuseException大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我在 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:对不起,我的英语很差,我来自比利时

解决方法

@L_197_39@.确保在开始其他活动之前关闭所有打开的数据库连接/游标等.

大佬总结

以上是大佬教程为你收集整理的调用database.rawQuery时的Android SQLiteMisuseException全部内容,希望文章能够帮你解决调用database.rawQuery时的Android SQLiteMisuseException所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。