不知道为什么,明明插进去了,但是就是查不到。既然cursor不为null了,count还是为0,getstring(index)也报错。求大神帮忙
解决方案 »
- AlertDialog对话框中从EditText中取数据的问题。还挺纠结的。
- 求助
- 同一个工程,同一个package下面的java文件是否自动相互引用?
- 请教 我先实现 android的 dd命令,镜像备份
- 在线等!!高手!!!急,android有解析vcard的api没?
- 为什么我的android源码编译出来,没有system.img,只有data.img和ramdisk.img
- 当在手机调试安卓程序,程序直接停止了,没有报异常怎么办?
- 往通讯录中插入联系人信息时出错
- android 的layout 加载时 程序挂掉。帮我分析下,谢谢
- 布局修改就保存
- 为什么有R.java文件,也更新了,再Activity类还是提示找不到R下的各种id呢?
- sdk Manager无法启动虚拟机
mCursor = managedQuery(mUri, PROJECTION, null, null, null);//查询
重新
Uri mUri = .....;
Since: API Level 1
Inserts a row into a table at the given URL. If the content provider supports transactions the insertion will be atomic.Parameters
url The URL of the table to insert into.
values The initial values for the newly inserted row. The key is the column name for the field. Passing an empty ContentValues will create an empty row. Returns
the URL of the newly created row.
确实是的
uri = ContentUris.withAppendedId(NOTEBOOK_URI, rowId)
rowid是db.insert返回的数据行index。
最后生成的是content://XXX/note/10。
没有错误吧。。