Sqlite China  
首页 | 各种语言的sqlite编程 | sqlite研究 | sqlite应用实例与杂谈 |sqlite相关下载 | SQlite论坛
当前位置 : 主页>sqlite应用实例与杂谈>列表
SQLite3 MFC 封装类
来源:工友 作者:工友 时间:2007-12-22

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 typedefs 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.
    /upimg/soft/1_071222094638.zip
(阅读次数:
上一篇:Mysql到Sqlite的SQL语句转换程序 下一篇:CppSQLite - SQLite的C++封装
[收藏] [推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]
用户名: 新注册) 密码: 匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
§最新评论
热点文章
·TinaCMS 迷你CMS系统(SQLi
·推广SQLite数据库的运用-
·FexBook留言本
·Php+Sqlite+Ajax的C-blog
·Mysql到Sqlite的SQL语句转
·CppSQLite - SQLite的C++
·用 PHPRPC 实现 Ajax 级联
·走进全文搜索
·PHP+SQLITE制作简单的视频
·一个SQLite的轻量级包装 L
·SQLite 的一个Delphi 封装
·SQLite 的Lua 封装类(3.x
·php5+sqlite 网络日志 BF-
·一个小巧简单的LUA绑定SQL
·SQLite3 MFC 封装类
相关文章
·TinaCMS 迷你CMS系统(SQLi
·SQLite 的Lua 封装类(3.x
·CppSQLite - SQLite的C++
·SQLite3 MFC 封装类
·Mysql到Sqlite的SQL语句转
·SQLite 的一个Delphi 封装
·一个SQLite的轻量级包装 L
·一个小巧简单的LUA绑定SQL
·PHP+SQLITE制作简单的视频
·FexBook留言本

版权Power by DedeCms   后台登陆
Copyright @ 2007