﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-failnorth</title><link>http://www.cppblog.com/failnorth/</link><description /><language>zh-cn</language><lastBuildDate>Tue, 09 Jun 2026 17:48:43 GMT</lastBuildDate><pubDate>Tue, 09 Jun 2026 17:48:43 GMT</pubDate><ttl>60</ttl><item><title>打造支持加密与odbc的sqlite</title><link>http://www.cppblog.com/failnorth/archive/2013/10/23/203889.html</link><dc:creator>一万年太长</dc:creator><author>一万年太长</author><pubDate>Wed, 23 Oct 2013 05:15:00 GMT</pubDate><guid>http://www.cppblog.com/failnorth/archive/2013/10/23/203889.html</guid><wfw:comment>http://www.cppblog.com/failnorth/comments/203889.html</wfw:comment><comments>http://www.cppblog.com/failnorth/archive/2013/10/23/203889.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/failnorth/comments/commentRss/203889.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/failnorth/services/trackbacks/203889.html</trackback:ping><description><![CDATA[<div>
<div>
<div id="article_content" class="article_content">
<p>一直想找一个支持加密和odbc接口的sqlite免费版本，可以找了很久都没有找到。于是开始基于开源版本sqlite重新打造。</p>
<p>wxsqlite3(加密版sqlite):<a href="http://sourceforge.net/projects/wxcode/files/Components/wxSQLite3/" target="_blank">http://sourceforge.net/projects/wxcode/files/Components/wxSQLite3/</a></p>
<p>sqliteodbc(odbc版sqlite):<a href="https://github.com/softace/sqliteodbc" target="_blank">https://github.com/softace/sqliteodbc</a></p>
<p>解压下载的sqliteodbc-master.zip到sqliteodbc目录，解压wxsqlite3-3.0.5.zip到wxsqlite3目录</p>
<p>然后复制wxsqlite3目录下的sqlite3\secure\src下的所有文件到sqliteodbc</p>
<p>为了不改写sqliteodbc的代码，我们重命名sqlite3.c为sqlite3o.c，然后重命名sqlite3secure.c为sqlite3.c</p>
<p>再编辑修改后的sqlite3.c，找到#include "sqlite3.c"，替换为#include "sqlite3o.c"</p>
<p>然后就是根据需要修改sqlite3odbc.mak，比如加密算法等预处理定义。</p>
<p>然后visual studio xxxx命令提示符，切换到sqliteodbc目录，执行nmake -f sqlite3odbc.mak即可。</p>
<p>一切正常的话会生成一个sqlite3odbc.dll文件，然后我们执行rundll32 sqlite3odbc.dll,install，即可注册sqlite odbc数据驱动。</p>
<p>我们就可以使用ado或odbc访问sqlite，连接字符串可以在<span style="color: #00802a"><a href="http://www.connectionstrings.com/" target="_blank">www.<strong>connectionstring</strong>s.com</a>找到。</span></p></div></div></div><img src ="http://www.cppblog.com/failnorth/aggbug/203889.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/failnorth/" target="_blank">一万年太长</a> 2013-10-23 13:15 <a href="http://www.cppblog.com/failnorth/archive/2013/10/23/203889.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>