android resolver.query 查询数据时报错: get field slot from row 0 col X failed
来源:互联网 发布:建筑扫描建模软件 编辑:程序博客网 时间:2024/06/05 04:52
错误原因:
cursor.getString()获得某一列数据时,该字段的值,并没有从数据库中查询出来。
详细说明就是,在执行一下代码的时候
ContentResolver.query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)
projection 用来填写需要查询的字段,如果有一个字段并没有在其中,
而下面的代码又通过 cursor.getString()来获取该字段时,后天就回报这个错误。
解决方法:
1、在 projection 添加字段;
2、修改 cursor.getString()。
0 0
- android resolver.query 查询数据时报错: get field slot from row 0 col X failed
- android sqlite查询数据时报错: get field slot from row 0 col -1 failed
- android sqlite查询数据时报错: get field slot from row 0 col -1 failed
- get field slot from row 0 col -1 failed
- illegalstateexception:get field slot from row 0 col -1 failed
- android 数据库开发中java.lang.IllegalStateException: get field slot from row 0 col -1 failed 异常错误
- java.lang.IllegalStateException: get field slot from row 0 col -1 failed
- java.lang.IllegalStateException: get field slot from row 0 col -1 failed
- java.lang.IllegalStateException: get field slot from row 0 col -1 failed 异常错误
- java.lang.IllegalStateException: get field slot from row 0 col -1 failed
- java.lang.IllegalStateException: get field slot from row 0 col -1 failed
- IllegalStateException: get field slot from row 0 col -1 failed
- java.lang.IllegalStateException: get field slot from row 0 col -1 failed 异常错误
- java.lang.IllegalStateException:get field slot from row 1 col -1 failed
- 图片存储之BLOB : get field slot from row
- Android SQLite 数据库 java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow异常
- Android示例java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.
- IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.
- android Bitmap缩放
- unity3d 常用的指令SetActive()、renderer .enabled 、collider.enabled
- Python标准库:内置函数classmethod(function)
- iOS多线程编程Part 3/3 - GCD
- List<Object>强制转换为List<String>
- android resolver.query 查询数据时报错: get field slot from row 0 col X failed
- SecureCRT使用方法技巧
- 【Hibernate】Could not obtain transaction-synchronized Session for current thread
- 将一个字符串不使用额外容器向左移动M位
- iOS数据库编程
- vc6.0 class标签 显示不全
- 1024发布
- Spring@Autowired注解与自动装配
- Android中scroll的原理