-
大小: 3.47MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-10-29
- 语言: 数据库
- 标签: sqlite3 x64 lib CppSQLite3DB
资源简介
最新版本的sqlite3 64位静态库(不需要带dll),VS2010编译的,如果需要32位的自行编译就行了,里面包含demo和源码
CppSQLite3DB db;
db.open(DB_NAME);
string temp = "select value from config where key='aaaa'";
CppSQLite3Query q = db.execQuery(temp.c_str());
temp.clear();
while (!q.eof())
{
temp.append(q.fieldValue(0));
printf(temp.c_str());
q.nextRow();
}
CppSQLite3DB db;
db.open(DB_NAME);
string temp = "select value from config where key='aaaa'";
CppSQLite3Query q = db.execQuery(temp.c_str());
temp.clear();
while (!q.eof())
{
temp.append(q.fieldValue(0));
printf(temp.c_str());
q.nextRow();
}
代码片段和文件信息
#include
#include
#include “../CppSQLite3.h“
#ifdef _DEBUG
# pragma comment(lib “../sqlite3_d.lib“)
#else
# pragma comment(lib “../sqlite3.lib“)
#endif
using namespace std;
const char* gszFile = “test.db“;
int main(int argc char** argv)
{
try
{
int i fld;
time_t tmStart tmEnd;
CppSQLite3DB db;
cout << “SQLite Header Version: “ << CppSQLite3DB::SQLiteHeaderVersion() << endl;
cout << “SQLite Library Version: “ << CppSQLite3DB::SQLiteLibraryVersion() << endl;
cout << “SQLite Library Version Number: “ << CppSQLite3DB::SQLiteLibraryVersionNumber() << endl;
remove(gszFile);
db.open(gszFile);
cout << endl << “emp table exists=“ << (db.tableExists(“emp“) ? “TRUE“:“FALSE“) << endl;
cout << endl << “Creating emp table“ << endl;
db.execDML(“create table emp(empno int empname char(20));“);
cout << endl << “emp table exists=“ << (db.tableExists(“emp“) ? “TRUE“:“FALSE“) << endl;
////////////////////////////////////////////////////////////////////////////////
// Execute some DML and print number of rows affected by each one
////////////////////////////////////////////////////////////////////////////////
cout << endl << “DML tests“ << endl;
int nRows = db.execDML(“insert into emp values (7 ‘David Beckham‘);“);
cout << nRows << “ rows inserted“ << endl;
nRows = db.execDML(“update emp set empname = ‘Christiano Ronaldo‘ where empno = 7;“);
cout << nRows << “ rows updated“ << endl;
nRows = db.execDML(“delete from emp where empno = 7;“);
cout << nRows << “ rows deleted“ << endl;
////////////////////////////////////////////////////////////////////////////////
// Transaction Demo
// The transaction could just as easily have been rolled back
////////////////////////////////////////////////////////////////////////////////
int nRowsToCreate(25000);
cout << endl << “Transaction test creating “ << nRowsToCreate;
cout << “ rows please wait...“ << endl;
tmStart = time(0);
cout << “PRE-TXN AUTO COMMIT=“ << (db.IsAutoCommitOn() ? “Y“ : “N“) << endl;
db.execDML(“begin transaction;“);
cout << “IN-TXN AUTO COMMIT=“ << (db.IsAutoCommitOn() ? “Y“ : “N“) << endl;
for (i = 0; i < nRowsToCreate; i++)
{
char buf[128];
sprintf(buf “insert into emp values (%d ‘Empname%06d‘);“ i i);
db.execDML(buf);
}
db.execDML(“commit transaction;“);
cout << “POST-TXN AUTO COMMIT=“ << (db.IsAutoCommitOn() ? “Y“ : “N“) << endl;
tmEnd = time(0);
////////////////////////////////////////////////////////////////////////////////
// Demonstrate CppSQLiteDB::execScalar()
////////////////////////////////////////////////////////////////////////////////
cout << db.execScalar(“select count(*) from emp;“) << “ rows in emp table in “;
cout << tmEnd-tmStart << “ seconds (that was fast!)“ << endl;
////////////////////////////////////////////////////////////////////////////////
// Re-cr
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-06-29 13:47 sqlite3\
文件 8193 2007-07-12 21:27 sqlite3\CppSQLite3.h
目录 0 2015-06-29 14:00 sqlite3\demo\
文件 850 2015-06-29 13:42 sqlite3\demo\demo.sln
文件 849 2015-06-29 13:22 sqlite3\demo\demo.sln.old
文件 13312 2015-06-29 13:57 sqlite3\demo\demo.suo
文件 9728 2015-06-29 13:41 sqlite3\demo\demo.suo.old
文件 6905 2015-06-29 13:22 sqlite3\demo\demo.vcproj
文件 2651 2015-06-29 13:41 sqlite3\demo\demo.vcproj.PC-201205301933.hadoop.user
文件 9887 2015-06-29 13:42 sqlite3\demo\demo.vcxproj
文件 929 2015-06-29 13:42 sqlite3\demo\demo.vcxproj.filters
文件 143 2015-06-29 13:42 sqlite3\demo\demo.vcxproj.user
文件 8567 2015-06-29 13:45 sqlite3\demo\main.cpp
目录 0 2015-06-29 13:38 sqlite3\demo\x64\
目录 0 2015-06-29 13:58 sqlite3\demo\x64\Debug\
目录 0 2015-06-29 13:58 sqlite3\demo\x64\Release\
文件 791552 2015-06-29 13:57 sqlite3\demo\x64\Release\demo.exe
文件 379816 2015-06-27 02:48 sqlite3\sqlite3.h
文件 3120756 2015-06-29 13:56 sqlite3\sqlite3.lib
文件 2650378 2015-06-29 13:56 sqlite3\sqlite3_d.lib
目录 0 2015-06-29 14:00 sqlite3\src\
文件 368 2011-02-23 07:32 sqlite3\src\clear.bat
目录 0 2015-06-29 14:01 sqlite3\src\sqlite3\
文件 1242 2015-06-29 13:51 sqlite3\src\sqlite3.sln
文件 17408 2015-06-29 14:00 sqlite3\src\sqlite3.suo
文件 19310 2010-01-18 11:31 sqlite3\src\sqlite3\codec.c
文件 3285 2010-02-05 00:25 sqlite3\src\sqlite3\codec.h
文件 9748 2010-08-23 22:11 sqlite3\src\sqlite3\codecext.c
文件 35791 2007-07-12 22:15 sqlite3\src\sqlite3\CppSQLite3.cpp
文件 8193 2015-06-29 13:51 sqlite3\src\sqlite3\CppSQLite3.h
文件 52938 2010-03-25 00:43 sqlite3\src\sqlite3\extensionfunctions.c
............此处省略14个文件信息
相关资源
- libmysql_d.dlllibmysql_e.dll
- libmysql_d.dll126
- SQL2005 x64 SP4文件
- mysql-connector-odbc-3.51.30-winx64 mysql驱动
- mysql-connector-odbc-5.3.9-winx64.msi
- SQLyog-11.3.3.0_x64中文破解版
- linux电子词典项目(sqlite3数据库)
- 32位的QT连接64位的mysql数据库的驱动文
- mysql-connector-odbc-noinstall-5.3.6-winx64.zi
-
Oracle Databa
se 19c Grid & RAC for Windo - 32/64位MySqllib、dll资源
- libmysql_e.dll、libmysqld.dll
- libmysql_win32(32位libmysql.dll)
- snc sql native client
- sqlite-netFx40-binary-x64-2010-1.0.94.0.zip
- Beginning STM32: Developing with FreeRTOS libo
- libmysqlclient.so.16(64bit)
- Oracle11g安装时需要的包 包括libaio,
- mysql-connector-odbc-5.2.6-winx64.msi
- glibc-devel-2.3.4-2.x86_64.rpm
- sqlite3嵌入式数据库加密
- sqldmo x86/x64
- sqlite-tools-win32-x86-3240000.zip
- mysqlclient-1.3.13-cp36-cp36m-win_amd64.whl
- libmysql.dll和libmysql.lib(含32位和64位)
- WindowsServer2003.WindowsXP-KB968730-x64-CHS.e
- Oracle Server JRE 7 Update 55
- Oracle_GoldenGate_11.2.1.0.3 for Oracle_11g_wi
- PLSQL Developer_9_x64
-
AccessDataba
seEngine2010_X64
评论
共有 条评论