Android的 - 你可以更新光标SQLite的结果吗? [英] Android - Can you update a Cursor for SQLite results?

查看:100
本文介绍了Android的 - 你可以更新光标SQLite的结果吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一个方法返回一个游标一些SQLite的查询结果。

One of my methods returns a Cursor from some SQLite query results.

当我通过游标导航,还有一些记录,我想改变/更新。我可以直接用光标更新?还是我不得不手动更新使用记录ID从光标?

As I'm navigating through the cursor, there are some records I want to change/update. Can I update directly with the cursor? Or do I have to manually UPDATE using the record ID from the cursor?

推荐答案

您不能直接更新的光标记录。阅读的Andr​​oid光标DOC

You can not directly update records with the cursor. Read the Android Cursor doc.

这篇关于Android的 - 你可以更新光标SQLite的结果吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆