SQLite android.database.CursorIndexOutOfBoundsException
来源:互联网 发布:linux kvm教程 编辑:程序博客网 时间:2024/05/08 02:31
今天用到了数据库SQLite,在遍历的时候出现了数组溢出报错,一开始遍历时用的是cursor.move(i)的方法,逻辑也没有错,上网查了一下,别人也遇到这种状况,也是用了cursor.move()这个方法报错,别人用了其他移cursor的方式来解决,我把光标的移动方式换了一下,确实不再报错了。
Cursor c = sqLiteDatabase.query("表名", null, null, null, null, null, null); c.moveToFirst();//光标移动到第一个 while (!c.isAfterLast()) {//判断是不是最后一个的后面,意思就是是否指空 //功能代码区,编辑你所需要的代码 c.moveToNext(); } c.close();
0 0
- SQLite android.database.CursorIndexOutOfBoundsException
- Database: android.database.CursorIndexOutOfBoundsException
- android.database.CursorIndexOutOfBoundsException
- android.database.CursorIndexOutOfBoundsException:Index -1
- android 使用游标获取 android.database.CursorIndexOutOfBoundsException:Index -1
- android.database.cursorindexoutofboundsexception错误解决 及获取某行某列信息
- cursor使用错误(android.database.CursorIndexOutOfBoundsException: Index -1 requested)
- android database SQLite
- Android SQLite Database
- Android SQLite Database Tutorial
- android.database.sqlite
- Create Android SQLite database
- Android开发7——android.database.CursorIndexOutOfBoundsException:Index -1 requested, with a size of 1
- android.database.CursorIndexOutOfBoundsException:Index -1 requested, with a size of 1
- android.database.CursorIndexOutOfBoundsException:Index -1 requested, with a size of 0
- android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 1
- android.database.CursorIndexOutOfBoundsException: Index <m> requested, with a size of <n>
- android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 3
- LTE资源调度(4)-上行资源申请方式和BSR缓存状态报告
- 【树2】树的子结构
- HDU 2050 折线分割平面
- 【GDOI2017模拟8.11】生物学家
- 伊吹萃香
- SQLite android.database.CursorIndexOutOfBoundsException
- 设计模式(java版)
- java算法(一)——排序算法(下)之 插入排序
- HttpURLConnection解析数据
- hadoop的心脏–shuffle过程解析
- virtualbox 中centos 在宽带连接状态下联网
- 基类析构函数必须为虚函数否则会造成内存泄漏
- Java程序员面试题集(1-50)
- Mac安装brew