FT_Uhu 0 Posted Monday at 02:24 PM (edited) Hi all, I am working with Delphi FireDAC and SQLite, and I recently ran into an issue after upgrading to RAD Studio 12.3. In previous versions (prior to RAD Studio 12.0), I was using SQLite 3.31.1 with FireDAC encryption (FDE), which worked well for my use case. However, as RAD Studio 12.0 introduced support for SQLite 3.42, I noticed some changes that impacted my project. To summarize, RAD Studio 12.0 added support for SQLite 3.42 while still maintaining compatibility with SQLite 3.31.1, and it was possible to use FireDAC encryption (FDE) with SQLite 3.31.1. Starting from SQLite 3.42, SQLite dropped the mechanism that FireDAC uses for encryption, so the encryption feature is no longer available with SQLite 3.42 or newer unless we use the paid SQLite EE with native encryption support. For those still wanting to use FireDAC encryption with SQLite, here are the available options: Use the latest SQLite version without FireDAC encryption. Use SQLite EE (Enterprise Edition), which has native encryption support. Stick with SQLite 3.31.1 or earlier versions if you want to continue using FireDAC encryption (FDE). I have been continuing with SQLite 3.31.1, and FireDAC’s encryption worked fine with FireDAC.Phys.SQLiteWrapper.FDEStat in uses in version 12.2. However, after upgrading to RAD Studio 12.3, I now encounter an Access Violation when using this. Has anyone else faced this issue? If so, does anyone have any advice on how to fix or work around this problem in RAD Studio 12.3? Any insights or solutions would be greatly appreciated! Thanks in advance Edited 20 hours ago by FT_Uhu Problem solved Share this post Link to post
Patrick PREMARTIN 114 Posted Monday at 02:41 PM Hi I use SQLite with FDE and haven't any problem on the projects I compiled or tested on 12.3 Athens. For which platform do you have the violation access exception ? Can you reproduce it on a short project ? Share this post Link to post
FT_Uhu 0 Posted 20 hours ago I resolved the problem. It appears that in some another unit in uses was FireDAC.Phys.SQLiteWrapper.Stat. And this cause to the error. When I remove everywhere (designer on form if you create connection or TFDQuery also will put this unit in uses automatic, so I moved creating everything in code) all begin working fine. Share this post Link to post
Patrick PREMARTIN 114 Posted 20 hours ago Good to know. In projects used in older Delphi releases (or for open source) I suggest to replace the unit by this code if you still use FireDAC Encryption for SQLite : {$IF CompilerVersion >= 36.0} // Delphi 12 Athens FireDAC.Phys.SQLiteWrapper.FDEStat, {$ELSE IF CompilerVersion >= 34.0} // Delphi 10.4 Sydney FireDAC.Phys.SQLiteWrapper.Stat, {$ELSE} FireDAC.Phys.SQLiteWrapper, {$IFEND} Share this post Link to post