simplecursoradapter使用时提示column '_id' does not exist
来源:互联网 发布:九阴真经安卓版免网络 编辑:程序博客网 时间:2024/06/15 00:59
simplecursoradapter继承自cursoradapter,这个类有个隐形规定,就是数据库中必须有_id这个字段。
解决这个问题的方法是:
1、重名命名数据库表,将自增长的主键命名为_id
2、使用数据库查询语言时,使用db.rawQuery(select * from biao,null)-----数据库中有_id字段时
3、使用db.rawQuery(select id as _id,name from biao)---数据库中无_id时。
也就是查询时必须查找_id列。
- simplecursoradapter使用时提示column '_id' does not exist
- 使用 SimpleCursorAdapter 时java.lang.IllegalArgumentException: column '_id' does not exist问题
- 一夜的错误 : simpleCursorAdapter column '_id' does not exist
- SimpleCursorAdapter知识点关于一个: (IllegalArgumentException: column '_id' does not exist)_id字段的异常
- column '_id' does not exist
- column '_id' does not exist
- 关于使用CursorAdapter()时出现“column '_id' does not exist”错误的说明及解决方案
- java.lang.IllegalArgumentException: column '_id' does not exist
- java.lang.IllegalArgumentException: column '_id' does not exist
- android——错误:column ‘_id’ does not exist
- java.lang.IllegalArgumentException: column '_id' does not exist
- java.lang.IllegalArgumentException: column '_id' does not exist
- 安卓报错 column '_id' does not exist 的解决
- java.lang.IllegalArgumentException: column '_id' does not exist 的相关
- Android 异常 -1 column '_id' does not exist
- java.lang.IllegalArgumentException: column '_id' does not exist
- java.lang.IllegalArgumentException: column '_id' does not exist 解决方法
- Android Caused by: java.lang.IllegalArgumentException: column '_id' does not exist
- Oracle 日期格式类型和日期函数 java操作数据库
- SQL GROUP BY 语句
- 线性代数导论18——行列式及其性质
- Hough变换原理
- test web link
- simplecursoradapter使用时提示column '_id' does not exist
- 缺少动态连接库.so--cannot open shared object file: No such file or directory
- OGNL知识
- 基于Socket和多线程编程的聊天程序实现
- equal和==的区别
- jsp乱码问题
- 存储性能指标--iops
- NATIVE_FULL_OUTER_JOIN
- H.264简单总结