资源简介
这里是一个vs2010编写的mfc对话框小例子,里面包含了sqlite的增、删、改、查,其中‘查询’包括了利用回调函数查询以及同步查询
代码片段和文件信息
/*
** 2001 September 15
**
** The author disclaims copyright to this source code. In place of
** a legal notice here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely never taking more than you give.
**
*************************************************************************
** This file contains code to implement the “sqlite“ command line
** utility for accessing SQLite databases.
*/
#if (defined(_WIN32) || defined(WIN32)) && !defined(_CRT_SECURE_NO_WARNINGS)
/* This needs to come before any includes for MSVC compiler */
#define _CRT_SECURE_NO_WARNINGS
#endif
/*
** If requested include the SQLite compiler options file for MSVC.
*/
#if defined(INCLUDE_MSVC_H)
#include “msvc.h“
#endif
/*
** No support for loadable extensions in VxWorks.
*/
#if (defined(__RTP__) || defined(_WRS_KERNEL)) && !SQLITE_OMIT_LOAD_EXTENSION
# define SQLITE_OMIT_LOAD_EXTENSION 1
#endif
/*
** Enable large-file support for fopen() and friends on unix.
*/
#ifndef SQLITE_DISABLE_LFS
# define _LARGE_FILE 1
# ifndef _FILE_OFFSET_BITS
# define _FILE_OFFSET_BITS 64
# endif
# define _LARGEFILE_SOURCE 1
#endif
#include
#include
#include
#include
#include “sqlite3.h“
#if SQLITE_USER_AUTHENTICATION
# include “sqlite3userauth.h“
#endif
#include
#include
#if !defined(_WIN32) && !defined(WIN32)
# include
# if !defined(__RTP__) && !defined(_WRS_KERNEL)
# include
# endif
# include
# include
#endif
#if HAVE_READLINE
# include
# include
#endif
#if HAVE_EDITLINE
# include
#endif
#if HAVE_EDITLINE || HAVE_READLINE
# define shell_add_history(X) add_history(X)
# define shell_read_history(X) read_history(X)
# define shell_write_history(X) write_history(X)
# define shell_stifle_history(X) stifle_history(X)
# define shell_readline(X) readline(X)
#elif HAVE_LINENOISE
# include “linenoise.h“
# define shell_add_history(X) linenoiseHistoryAdd(X)
# define shell_read_history(X) linenoiseHistoryLoad(X)
# define shell_write_history(X) linenoiseHistorySave(X)
# define shell_stifle_history(X) linenoiseHistorySetMaxLen(X)
# define shell_readline(X) linenoise(X)
#else
# define shell_read_history(X)
# define shell_write_history(X)
# define shell_stifle_history(X)
# define SHELL_USE_LOCAL_GETLINE 1
#endif
#if defined(_WIN32) || defined(WIN32)
# include
# include
# define isatty(h) _isatty(h)
# ifndef access
# define access(fm) _access((f)(m))
# endif
# undef popen
# define popen _popen
# undef pclose
# define pclose _pclose
#else
/* Make sure isatty() has a prototype. */
extern int isatty(int);
# if !defined(__RTP__) && !defined(_WRS_KERNEL)
/* popen and pclose are not C89 functions and so are
** sometimes omitted from the header */
extern FILE *popen(const char*const char*);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-09-09 10:14 Demo\
目录 0 2016-09-09 10:13 Demo\DB\
文件 229 2016-09-08 19:36 Demo\DB\db.sql
目录 0 2016-09-08 15:52 Demo\DB\include\
文件 175702 2016-08-12 03:17 Demo\DB\include\shell.c
文件 6955002 2016-08-12 03:17 Demo\DB\include\sqlite3.c
文件 493692 2016-08-12 03:17 Demo\DB\include\sqlite3.h
文件 30004 2016-08-12 03:17 Demo\DB\include\sqlite3ext.h
文件 5293 2016-08-12 22:55 Demo\DB\sqlite3.def
文件 1684992 2016-08-12 22:55 Demo\DB\sqlite3.dll
文件 682496 2016-08-12 03:18 Demo\DB\sqlite3.exe
文件 16384 2016-09-09 10:13 Demo\DB\test.db
目录 0 2016-09-08 15:52 Demo\DB\x64\
文件 33250 2016-09-08 15:33 Demo\DB\x64\sqlite3.exp
文件 55430 2016-09-08 15:33 Demo\DB\x64\sqlite3.lib
目录 0 2016-09-08 15:52 Demo\DB\x86\
文件 33724 2016-09-08 15:34 Demo\DB\x86\sqlite3.exp
文件 56632 2016-09-08 15:34 Demo\DB\x86\sqlite3.lib
目录 0 2016-09-09 10:14 Demo\Demo\
文件 1233 2016-09-08 16:00 Demo\Demo.sln
文件 4296 2016-09-09 10:01 Demo\Demo\DBTool.cpp
文件 1138 2016-09-09 10:04 Demo\Demo\DBTool.h
文件 105872 2016-09-09 10:14 Demo\Demo\Demo.aps
文件 1967 2016-09-08 15:50 Demo\Demo\Demo.cpp
文件 430 2016-09-08 15:50 Demo\Demo\Demo.h
文件 10936 2016-09-09 10:14 Demo\Demo\Demo.rc
文件 12031 2016-09-08 16:22 Demo\Demo\Demo.vcxproj
文件 2145 2016-09-08 16:14 Demo\Demo\Demo.vcxproj.filters
文件 143 2016-09-08 15:50 Demo\Demo\Demo.vcxproj.user
文件 4527 2016-09-09 09:42 Demo\Demo\DemoDlg.cpp
文件 746 2016-09-08 19:23 Demo\Demo\DemoDlg.h
............此处省略17个文件信息
- 上一篇:MFC界面设计
- 下一篇:轻松玩转AVR单片机C语言
评论
共有 条评论