#ifndef __SQLITE3_INTERFACE_20160120__ #define __SQLITE3_INTERFACE_20160120__ #pragma once #include #include #ifndef _UNICODE typedef std::string TString; #else typedef wstring TString; #endif #include "..\\SQLite3\\sqlite3.h" #pragma comment(lib, "SQLite3.lib") class ISQLite3 { public: ISQLite3(void); ~ISQLite3(void); public: //打开; int Open(const char* pszpath); //关闭; int Close(); //创建表; int CreateTabel(const char* pSql, CString& strError); //执行; int Exec(const char* pSql, CString& strError); //错误消息; const char* Get_ErrMsg(); //查询; int Select(const char* pTableName, const char* pFields, const char* pLimit, std::vector& vValues, CString& strError); //插入; int Insert(const char* pTableName, const char* pFields, const char* pValues, CString& strError); //删除; int Delete(const char* pTableName, const char* pLimit, CString& strError); private: sqlite3* m_pSQLite3; }; #endif