weabow 3 Posted November 12 (edited) Hi there, I've an app which runs fine on Delphi 11, using crypted (aes-256) SQLite db, throught FireDac. This code no longer runs under Delphi 12. An error is fired from FireDAC.Phys.SQLiteWrapper.pas, procedure TSQLiteDatabase.Key(const AKey: String);, line 2119 : if Assigned(Lib.Fsqlite3_key) then begin... It seems that Lib.Fsqlite3_key is not assigned. Any idea will be very appreciated... Edited November 13 by weabow Share this post Link to post
Uwe Raabe 1682 Posted November 12 That is mentioned in the What's New: FireDAC SQLite Version Update Share this post Link to post
Darian Miller 316 Posted November 12 That same DocWiki page stated "The default linkage mode is static with SQLite version 3.31.1 with FDE." so I would assume it would be backwards compatible. Share this post Link to post
Uwe Raabe 1682 Posted November 12 It may depend on the uses list and its order. The different Stat units register different default values: {FireDAC.Phys.SQLiteWrapper.FDEStat} initialization TSQLiteLib.GLibClasses[slDefault] := TSQLiteLibFDEStat; TSQLiteLib.GLibClasses[slFDEStatic] := TSQLiteLibFDEStat; {FireDAC.Phys.SQLiteWrapper.SSEStat} initialization TSQLiteLib.GLibClasses[slDefault] := TSQLiteLibSEEStat; TSQLiteLib.GLibClasses[slSEEStatic] := TSQLiteLibSEEStat; {FireDAC.Phys.SQLiteWrapper.Stat} initialization TSQLiteLib.GLibClasses[slDefault] := TSQLiteLibStat; TSQLiteLib.GLibClasses[slStatic] := TSQLiteLibStat; Manually adding FireDAC.Phys.SQLiteWrapper.FDEStat to the uses may solve the problem. I'd rather set the mode to an explicit value instead relying on a volatile default. Share this post Link to post
weabow 3 Posted November 13 Thanks for your replies. I've read the FireDAC SQLite Version Update and I understand I have to use option 3 : Continue using SQLite 3.31.1 or previous versions with FireDAC encryption (FDE). But I didn't see anywhere how to do that (sorry, it's not my best expertise). What's the code I need to put and where ? Share this post Link to post
weabow 3 Posted November 13 (edited) [SOLVED] I've put on app boot a on the main form : TFDPhysSQLiteDriverLink, with the property : EngineLinkage -> sIFDEStatic Maybee an idea do do that from code ? Edited November 13 by weabow Share this post Link to post
emileverh 16 Posted November 13 May be a stupid question; but I am correct with the option 'EngineLinkage -> sIFDEStatic' I don't need any external DLL? ( Now I deploy sqlite3.dll to all my clients ). Or is this other behaviour... Share this post Link to post
weabow 3 Posted November 13 I think it depends on the OS target. On Windows, I do not add any file On Android, I add lib-native-activity.so On MacOs I add libcdsqlite.dylib and libcrypto.dylib On IOS I add ... nothing On Linux I add ... nothing But I'm not sure all these libraries concern SQLite Share this post Link to post
emileverh 16 Posted November 13 5 minutes ago, weabow said: I think it depends on the OS target. On Windows, I do not add any file On Android, I add lib-native-activity.so On MacOs I add libcdsqlite.dylib and libcrypto.dylib On IOS I add ... nothing On Linux I add ... nothing But I'm not sure all these libraries concern SQLite Great! I work only on the Windows platform. One DLL less 😉 So the Embarcadero guys did a translation found on the SQLITE.ORG source code to Delphi-Pascal? Share this post Link to post
Fr0sT.Brutal 892 Posted November 17 On 11/13/2023 at 10:46 AM, emileverh said: So the Embarcadero guys did a translation found on the SQLITE.ORG source code to Delphi-Pascal? They just use OBJ just like with Zip and RegExp Share this post Link to post