test.cpp
来自「sqlite数据库的源代码, 例子是在windows上使用,不过可以移值到各种平」· C++ 代码 · 共 32 行
CPP
32 行
// 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 + =
减小字号Ctrl + -
显示快捷键?