/************************************************************************************* * VC++6. 0 sqlite3 configuration, Test * Statement: * This article is only to test vc++6.0 can use the Sqlite3 database, mainly for the follow-up * some requirements. * 2015-10-21 Sunny Shenzhen Nanshan Ping Shan village Zengjianfeng ********************************************** **************************************/First, reference article:1. Vc6database http using SQLite in. 0://my.oschina.net/u/198124/blog/57362 2. Vc6. 0 Introduction to SQLite database programming in the environment (it's time to walk into the database) http://blog.csdn.net/stpeace/article/details/38503843 3. VC6.0 in configuration using Sqlite3 http://blog.csdn.net/ypist/article/details/7293200 4. SQLite Download Page http://www.sqlite.org/download.htmlsecond, the test operation process:1. Refer to the reference article to generate LIB files, and to add Lib files,. h files to the MFC project;2. #include"sqlite3.h"introduce sqlite3 function for use;3. Use the following code to test:Const Char*SSQL1 ="CREATE table users (name PRIMARY KEY, age int, score int);"; Const Char*SSQL2 ="INSERT into users values (' ZENGJF ', +, ten);"; Sqlite3*pdb =NULL; Char*perrmsg =NULL; Sqlite3_open ("zengjf.db", &pdb);//Open DatabaseSqlite3_exec (pDb, sSQL1, NULL, NULL, &PERRMSG);//Create a basic information formatSqlite3_exec (pDb, sSQL2, NULL, NULL, &PERRMSG);//Add InformationSqlite3_close (PDB);//Close the database 4Zengjf.db will be obtained in the directory where the DLL is located; 5. by downloading sqlite-shell-win32-x86-3090100. zip, unzip, configure environment variables;6. To the directory where Zengjf.db is located, execute: Sqlite3 zengjf.db7. Execute in sqlite3 shell:. Tables output: Users8. Query the results in the table:Select* fromusers; Output Result: ZENGJF| -|Ten
vc++6.0 sqlite3 Configuration, testing