Windows client software,FireDAC supports two SQLite library linking modes:
- Static linking: the x86 sqlite3_x86.obj or x64 sqlite3_x64.obj client library is statically linked into application. FireDAC provides sqlite3_Xxx.obj v 3.7.15. That is default mode, no additional files or actions is required. Note, SQLite database encryption is supported only for static linking.
- Dynamic linking: the x86 or x64 SQLITE3.DLL client library must be available to open a SQLite database. The recommended SQLITE3.DLL versions is 3.7.7.1 or higher. That is default mode for non-Windows platforms.
從FireDAC的幫助中我們看到,在Windows平台編程環境中,默認是Static linking模式(靜態鏈接)。這樣在開發本地程序,綠色程序會很方便,數據管理起來也很自如。
有了 FireDAC,我們可以放棄其他第三方的SQLite解決方案了,比如之前介紹的DISQLite3控件易用性肯定沒有FireDAC使用起來方便,並且是XE6版本中自帶的,無需安裝。 接下來我們參照萬一老師的 “FireDAC 下的 Sqlite”博客進行學習和研究。
XE6版本:Embarcadero.Delphi.XE6.RTM.Inc.Update1.v20.0.16277.1276.Lite.v9.1.exe (文件大小:369, 070, 000 Byte),安裝時記得選中FireDAC組件。
在XE6 IDE中Tools菜單下有一個“FireDAC Explorer”,我們點開進行瀏覽,其中的fddemo.sdb為官方提供。
記得請設置對fddemo.sdb文件路徑,並將Pooled設置為True,如果設置為False,每次瀏覽都會提示如下對話框:
到此為止,我們已經步入了FireDAC的大門。。。