如何读取SQLite3数据库,并将表的内容存储到本地数组中,以便以后可以使用它 [英] How do I read a SQLite3 DB, and store the contents of the Table into a Local Array so that I can use it later

查看:108
本文介绍了如何读取SQLite3数据库,并将表的内容存储到本地数组中,以便以后可以使用它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有任何用C ++编写sql数据库代码的经验。



所以我想要的是,打开一个sqlite DB,读取DB中指定表中的所有内容,然后将内容存储到Array或Vector中以便我以后可以使用它们。



请让我知道如何实现这一点。

I do not have any experience in writing the code for sql databases in C++.

So what I wanted was, to Open a sqlite DB, and read all the contents in a specified Table in the DB, and then store the contents into Array or Vector so that I can use them later.

Please let me know how do I accomplish this.

推荐答案

请参阅 http://www.sqlite.org/docs.html [ ^ ]用于文档和简单的示例代码。
See http://www.sqlite.org/docs.html[^] for documentation, and simple sample code.


这篇关于如何读取SQLite3数据库,并将表的内容存储到本地数组中,以便以后可以使用它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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