根据提供的条件从 sqlite 获取数据到 edittext
我正在开发一个 Android
项目,在该项目中我遇到了一个问题。我需要根据提供的条件从 SQLite
db
获取数据。
准确地说,我的意思是说我需要从 SQLite
获取数据,我在其中提供在 EditText
中返回值的显示条件。
比如:
SELECT SPECIALCHARCTER FROM <TABLENAME> WHERE POSITION = "0";
我需要一个好的链接来研究这个过程。任何人都可以帮我解决问题吗?
您可以查看DBHelper.java类的示例代码。
我会很高兴看到朋友们的回复并帮助我解决这个问题。
谢谢&问候,
拉加夫
I am working on an Android
project where I am struck with a issue. I need to fetch data from SQLite
db
based on condition provided.
In precise I mean to say I need to get the data from SQLite
where I provide condition an display that returned value in EditText
.
Like:
SELECT SPECIALCHARCTER FROM <TABLENAME> WHERE POSITION = "0";
I need a good link to study this process. Can anyone please help me in issue.
You can check out sample code of DBHelper.java class.
I shall be very happy to see reply from u friends and help me in solving this issue.
Thanks & Regards,
Raghav
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试按以下方式选择语句,
这可能会对您有所帮助
Try select statement in the following way
this may helps you
抱歉,您粘贴的代码很混乱,因为它的格式不好并且充满了注释掉的代码。很难看到任何东西。
我看到的是这段代码:
这将因多种原因而失败:
我的建议:从此类中删除每个 UI 元素并开始阅读 Pratik 在他的答案中提供的一些链接。
Sorry but you code pasted is a mess as it is not good formatted and filled with code that is commented out. Hard to see anything.
What I saw was this code:
This will fail for multiple reasons:
My advice: Remove every UI element from this class and start reading some links Pratik provided in his answer.
这是使用带有许多控件的 android 的 sqlite 的良好链接
http://www. vogella.de/articles/AndroidListView/article.html
http://marakana.com/forums/android/examples/55.html
http://saigeethamn.blogspot.com/2009/10/android-developer-tutorial-part-12.html
here is the good links to work with the sqlite with android with many controls
http://www.vogella.de/articles/AndroidListView/article.html
http://marakana.com/forums/android/examples/55.html
http://saigeethamn.blogspot.com/2009/10/android-developer-tutorial-part-12.html