android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or da
来源:互联网 发布:js 时间戳格式化函数 编辑:程序博客网 时间:2024/05/22 18:24
Cursor cursor=null;Cursor cursor2=null;db = helper.getReadableDatabase();try{ cursor=rawQuery("...",null);while (cursor.moveToNext()){// ...cursor2=db.rawQuery("select file_path from memos where time > "+date+" and time < "+lg+" order by time desc",null);if(cursor2.moveToNext()){//...}cursor2.close(); // 因是在循环内,要在此处加上关闭,而不仅只在finally中关闭// ... }}}finally{if(cursor!=null){cursor.close();}if(cursor2!=null){cursor2.close();}db.close(); // 此处可以根据情况关闭与否}
0 0
- android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or da
- android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or da
- Application did not close the cursor or database object that was opened here 异常
- Exit the Android application or Close all the Android ativities
- 07-09 03:16:08.655: E/Database(426): android.database.sqlite.DatabaseObjectNotClosedException: Appli
- android.database.sqlite.databaseobjectnotclosedexception:应用程序没有关闭的光标或数据库对象
- android.database.sqlite.databaseobjectnotclosedexception:应用程序没有关闭的光标或数据库对象
- Caused by: android.database.sqlite.SQLiteDatabaseCorruptException: file is encrypted or is not a dat
- Android SQLite - close() was never explicitly called on database
- android SQLite :close() was never explicitly called on database 'XXXXXX'
- Caused by: android.database.StaleDataException: Attempted to access a cursor after it has been close
- Should I design the application or model (database) first?
- Android C#开发--The 'XamarinShellPackage' package did not load correctly
- Db2 client上load from cursor报错SQL1013N The database name .. could not be found
- "The target '__Page' for the callback could not be found or did not implement ICallbackEventHandler."的解决办法
- DevExpress Exception Solution - The target "X" for the callback could not be found or did not implement ICallbackEventHandler
- The origin server did not find a current representation for the target resource or is not willing to
- The origin server did not find a current representation for the target resource or is not willing to
- ImageLoader双缓存机制加载图片
- python多线程thread/threading的使用
- 内部类的相关特性
- php相关
- C++ Socket 编程
- android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or da
- grails学习笔记-2、开发环境搭建
- jsb 多点与单点触摸设置
- ASP.NET中的<%%>,<%=%>,<%#%>,<%$%>
- C语言文件操作
- 利用Instant Client ,不安装oracle客户端使用sqlplus连接远程数据库的步骤
- vagrant 打包问题
- select2插件的使用
- SiteMesh的使用