RAD Studio*11 Alexandria, like previous versions, ships with a FireDAC driver for the SQLite*database offering two different approaches for delivery. One option is static linking, that*is, to*compile*SQLite into your application binary, by linking the compiled code. The second option is dynamic linking, that is, to use an external SQLite
DLL. The two alternatives and their configurations for different platforms are covered in details at:
https://docwiki.embarcadero.com/RADS...base_(FireDAC)
FireDAC SQLite*Encryption
The static linking version of FireDAC SQLite driver offers*database encryption support, using a database hook mechanism (SQLITE_HAS_CODEC) that has now been
removed from the latest versions of SQLite by the database dev team. For this reason FireDAC*still supports SQLite encryption on the last version of SQLite with the "feature". If you want the latest*SQLite and don't need encryption, you can use the
DLL version.
Going forward the plan is to deprecate*FireDAC SQLite Encryption or at least to provide*it as a legacy option, and move to the latest version of SQLite also for the statically compiled version. Notice also that if you from FireDAC SQLite Encryption to FireDAC SQLite Encryption Extension (SEE) driver, you'll end up with a different*encryption implementation: For this reason the SQLite database files won't be compatible.
SQLite Encryption Extension (SEE)
The path forward*with SQLite Encryption by Hwaci (the company behind SQLite) is to recommend the use of*SQLite Encryption Extension (SEE), a paid version of SQLite. You can read more about this database at these links:
Given this was requested*by some customers to support SQLite EE, Embarcadero has created a specific FireDAC driver. Notice that the license agreement indicates*you should use static linking (but, because I'm not a layer, refer to the license linked above for details). No third party like Embarcadero is entitled to distribute the library*source or the compiled binary code. So what Embarcadero is providing to developers is the source code of the new FireDAC driver, plus some C++Builder-based scripts to compile the library. You'll have to build and link the two pieces (library code and Delphi
unit) together on your development system -- and this might require owning the full
RAD Studio, as you need to compile both C++ and Delphi code.
Consider InterBase*ToGo as an Alternative
Before I get to the download and practical side, notice that, depending on your target platforms and other requirements, you can consider using
InterBase ToGo and its database encryption support as an alternative to SQLite EE -- the price model is a bit different, which makes it hard to compare directly, but I'm certain Embarcadero sales team can help you figure out.
The Driver GetIt Download
As mentioned, the download is available in a specific, new GetIt
package for customers with an active update subscription:
Embarcadero will make the download available also in the customers portal shortly.*Below, I've attached the read me of this GetIt
package with additional information.
FireDAC SQLite SEE Driver Read Me File
This is the complete text of the readme file in the*
FireDAC SQLite SEE static API wrapping classes, Copyright 2021 Embarcadero Technologies. All rights reserved.*
</br> Usage is subject to RAD Studio 11 EULA, see https://www.embarcadero.com/products...ad-studio-eula
SQLite Encryption Extension (SEE) is a product by Hipp, Wyrick & Company, Inc. (Hwaci) and it is subject to*
</br> the license available at https://www.hwaci.com/sw/sqlite/license-see.html
=== Static linkage
</br> This is recommended way to use SQLite SEE with your application. Use the new unit FireDAC.Phys.SQLiteWrapper.SEEStat.pas.*
</br> It enables static linkage of sqlite3 SEE to an application. This unit is provided to the customers only as PAS file, because*
</br> to produce DCU / etc we need sqlite3.obj, which is subject to SQLite SEE license restriction.
Usage:
</br> * Set FDPhysSQLiteDriverLink.Linkage=slSEEStatic. This will automatically add FireDAC.Phys.SQLiteWrapper.SEEStat to "uses" clause
</br> * ... or include FireDAC.Phys.SQLiteWrapper.SEEStat instead of FireDAC.Phys.SQLiteWrapper.Stat into application uses clause
</br> * Make FireDAC.Phys.SQLiteWrapper.SEEStat.pas accessible to compiler
</br> * Compile sqlite3 SEE and produce sqlite3_x86.obj / sqlite3_x64.obj. See "Recompiling SQLite SEE" section below
</br> * Put sqlite3_x86.obj / sqlite3_x64.obj into the folder with FireDAC.Phys.SQLiteWrapper.SEEStat.pas
=== Dynamic linkage
</br> This is subject to redistribution restrictions (see Hwaci license)
</br>
</br> Usage:
</br> * Set FDPhysSQLiteDriverLink.Linkage=slDynamic
</br> * Set FDPhysSQLiteDriverLink.SEEKey='xxx', where 'xxx' is SEE activation key
</br> * You can read more details in "www\readme.wiki" SEE distribution file, chapter "5.0 C Interface"
</br> * Provide sqlite3.dll SEE version and make it accessible to FireDAC application
=== What works, what does not
</br> FireDAC SQLite encryption (FSE) supports features, which SQLite SEE does not support:
</br> * when wrong password is specified, then FSE will return "wrong password", SEE always returns "file is not a database"
</br> * FSE can return the current encryption algorithm, SEE cannot*
</br> * the list of possible values for "Encrypt" FireDAC connection definition parameter has FSE supported values, not SEE ones
Notice that existing databases build with FireDAC SQLite encryption are not compatible with SQLite SEE databases.
</br> When you will build your application, it will be good to first get FireDAC environment reports,*to be sure that "the correct SQLite" is used.
=== Recompiling SQLite SEE
</br> Use provided sqlite_compile.bat to produce sqlite3_x86.obj / sqlite3_x64.obj. Before running sqlite_compile.bat update it and*set these variables to your actual values:
</br> * BDS - RAD Studio installation folder
</br> * SQLITE_SRC - path to sqlite source file
*
*
Weiterlesen...