#include "stdafx.h"
#include "sqlite3.h"#include <iostream>
#include "GBK2UTF8.h"
using namespace std;
bool createTable();//创建表
bool insert();
bool Delete();
bool update();
bool select();
int print_result_cb(void* data,int n_columns,char** column_values,char** column_names);
void print_row(int n_values, char** values);
sqlite3 *pDB = NULL;
char * errMsg = NULL;
int rc = 0;
int _tmain(int argc, _TCHAR* argv[])
{
//打开路径采用utf-8编码
//如果路径中包含中文,需要进行编码转换
string strConn = "F:\\sqlite\\test.db";
GBK2UTF8 gbk2utf8(strConn);
//打开一个数据库,如果改数据库不存在,则创建一个名字为test的数据库文件
rc = sqlite3_open(gbk2utf8.GetUTF8().c_str(), &pDB);
if(rc)
{
cout <<