• FireDAC中的SQLite(一)


    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为官方提供。

    SQLite001

    记得请设置对fddemo.sdb文件路径,并将Pooled设置为True,如果设置为False,每次浏览都会提示如下对话框:

    SQLite002

    到此为止,我们已经步入了FireDAC的大门。。。

  • 相关阅读:
    平台调用中的数据封送处理
    JavaScript 中的事件流
    Jquery插件 表格固定表头
    ASP.NET MVC Action Filter与内置的Filter实现
    getCurrentScript的改进
    analyze spring framework source
    Windows Azure: Service Bus Brokered Messaging DeadLetterQueue 使用详解
    C#截图
    权限系统
    音乐播放器
  • 原文地址:https://www.cnblogs.com/966615/p/12969393.html
Copyright © 2020-2023  润新知