如何拯救我的ArrayList到SQLite数据库? [英] How to save my Arraylist into SQLite database?
问题描述
我要救我
的ArrayList< HashMap的<字符串,字符串>> mylist中=新的ArrayList< HashMap的<字符串,字符串>>()
在SQLite数据库,并在以后检索它显示存储在其中的项目。我怎样才能做到这一点?
请举例说明。
在此先感谢:)
I want to save my
ArrayList<HashMap<String, String>> mylist = new ArrayList<HashMap<String, String>>()
in SQLite database and later retrieve it to display the items stored in it. How can I achieve this?
Please provide examples.
Thanks in Advance :)
推荐答案
的教程链接
请参阅以上链接。我已经使用HashMap的使用SQliteOpenHelper SQLite的操作工作的例子。它有一个插入的时间,但你可能想创建一个循环,如果你想插入它们都在同一个实例。
Please refer to the link above. I has a working example of using HashMap for SqLite operations using SQliteOpenHelper. It has one insertion at a time, but you might wanna create a loop, if you wish to insert them all in one instance.
这篇关于如何拯救我的ArrayList到SQLite数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!