Search code examples
sqlitedelphifiredacdelphi-10.4-sydney

Did FireDac SQLite change in Delphi 10.4?


My Delphi project has never used the actual sqlite3.dll but rather uses the embedded library.

I recompiled the project with 10.4 and sent it to testers who are seeing this error:

Exception EFDException in module ChessOpeningsWizardProfessional2016.exe at 007C6FDC. [FireDAC][Phys][SQLite]-314. Cannot load vendor library [sqlite3.dll or libdb_sql51.dll]. The specified module could not be found Hint: check it is in the PATH or application EXE directories, and has x86 bitness.

It runs fine on my machine without any Dll.

Has something in FireDac changed regarding Sqlite3 in Delphi 10.4 Sydney?


Solution

  • Yes, it did change - please see:

    http://docwiki.embarcadero.com/RADStudio/Sydney/en/New_features_and_customer_reported_issues_fixed_in_RAD_Studio_10.4#FireDAC_SQLite_driver_offers_both_static_and_dynamic_linkage

    For SQLite, FireDAC adds the ability to choose static vs dynamic linkage of SQLite engine. To use the static linkage of SQLite engine it is required to add the unit "FireDAC.Phys.SQLiteWrapper.Stat" to the uses clause of one of the units of your project. Otherwise dynamical linkage will be chosen. There is a new property TFDPhysSQLiteDriverLink.EngineLinkage. When the value is slDefault or slStatic, then the "FireDAC.Phys.SQLiteWrapper.Stat" unit will be added at design-time to the unit hosting the component. If application defines the connection at run-time, then the "FireDAC.Phys.SQLiteWrapper.Stat" unit must be added manually.