⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.cpp

📁 sqlite数据库的源代码, 例子是在windows上使用,不过可以移值到各种平台上使用
💻 CPP
字号:
// test.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "sqlite3.h"

int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
 	// TODO: Place code here.

	sqlite3 *db;
//	sqlite3_stmt *stat;
	char fileName[256] = ".\\poi.db";
	char *zErrMsg = 0;

    sqlite3_open(fileName, &db);
	if(db == NULL)
        return -1;
    sqlite3_key(db,"Carbon@Pass.2007",16);
	sqlite3_exec(db, "select * from sqlite_master where type=\'table\'", 0, 0, &zErrMsg);
    sqlite3_rekey(db,0,0);
	sqlite3_close(db);

	return 0;
}



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -