答案:SQLite3 MFC 封装类 |
软件类别: 程序源码 | | 软件语言: 英文 | 授权方式: 开源版 | 文件大小: 627KB | 运行环境: Win9x/NT/2000/XP | 添加时间: 2006-6-13 | 开 发 商: tamsyn | |
|
::软件简介:: |
Here is another wrapper for the famous SQLite3 database engine. While there are several other wrappers available here at Code Project, I don't believe they support MFC/Unicode or have the results tested on a Pocket PC. The wrapper source code is based on the SQLiteWrapper source produced by rene.nyffenegger@adp-gmbh.ch. I altered the original source while packaging it for use with Microsoft MFC. My primary objective in this exercise was to make the wrapper suitable for both MCBS and Unicode because Unicode is native to the Pocket PC. There are four key differences between this wrapper and the author's original source. - First, all the instances of
std::string were converted to Microsoft's generic string pointers using LPCTSTR . This should be familiar to developer's accustomed to working with MFC. This also means that you should rely heavily on the Microsoft TEXT or _T macros for hard-coded character strings should you wish to maintain portability between the desktop and the Pocket PC. - Second, I have changed the class
SQLiteStatement to CSqlStatement and SQLiteWrapper to CDbSQLite . This was primarily a matter of preference since most MFC developer's recognize Microsoft's conventions for the "Cx" nomenclature. - Third, I removed exception handling from the wrapper. Windows CE does not support the traditional
try , catch and throw paradigm so you are basically on your own with respect to error handling. - Finally, I have added the header SQLite3i.h with
typedef s to the various sqlite3.h functions. These type definitions are "internal" accessors to the sqlite3 functions conditionally utilizing either the UTF-8 or UTF-16 variation during compilation. For your entertainment, I incorporated a pragma in the header to inform you when you are compiling Unicode or MCBS.
|
::下载地址:: |
|
上一个:CppSQLite - SQLite的C++封装
下一个:Mysql到Sqlite的SQL语句转换程序