本文共 540 字,大约阅读时间需要 1 分钟。
使用CppSQLite3访问SQLite数据库
2014年4月9日16:33:59
C代码:
#include#include #include "CppSQLite3.h"#include using namespace std;int main(){ printf("hello,world!\n"); CppSQLite3DB db; db.open("data.db3"); /*db.execDML("create table test(id int,name char(20));"); db.execDML("insert into test values (1,'xiufeiyang');"); db.execDML("insert into test values (2,'lixueliang');");*/ CppSQLite3Query query = db.execQuery("select * from test"); while(!query.eof()) { cout<<"id:"< <<" name:"< <
转载地址:http://ynwci.baihongyu.com/