作者nesk (大棵)
看板AndroidDev
标题[问题] bulkinsert後马上query问题
时间Sun Apr 19 20:20:58 2015
我在thread中先用了context.getContentReslove.bulkInsert()来把资料放入db中
接着我使用了context.getContentReslove.query()来取出资料
因为我要得到_id栏位自动给的内容
可是发现所得到的cursor.getCount()得到的数量是零
感觉可能是 bulkInsert()还没存就被query了
不知getContentReslove是否有像commit或是flush的东西
让他能提早把内容写入
或是有没有办法能够debuug database 存取的内容
感谢各位大大
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.240.212.202
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/AndroidDev/M.1429446065.A.BC9.html