vc++6.0 sqlite3 Configuration, testing

Source: Internet
Author: User
Tags sqlite sqlite database sqlite download

/************************************************************************************* * 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.