kabiri 3 Posted January 11, 2023 I have old app in Android. I have used uniDac to connect to sqlite database. The database is encrypted using leAES256 method. FD cannot connect to it. I need to convert database for FD. But when I use both of these in the app, Delphi gives an error : sqlite3.c:(.text+0xb5e8): multiple definition of `sqlite3_aggregate_context' (And many other errors) I know the reason for the error but how to convert the database when I can't use both of them? Share this post Link to post
programmerdelphi2k 237 Posted January 11, 2023 (edited) well, if you know the "reason", then this way would be the better way to solve this problem. but if dont... if you can open in UniDAC usage, then, try UniDAC export /import manager Tutorial to CSV export https://www.sqlitetutorial.net/sqlite-export-csv/ or, you can use any other "DB Manager" to export it (datas) your database SQLite to any DB used by FireDAC Edited January 11, 2023 by programmerdelphi2k 1 Share this post Link to post
kabiri 3 Posted January 11, 2023 (edited) It is not a problem on PC and it is easy to migrate. There is a problem with the Android device. The DB is on the user's Android device. Edited January 11, 2023 by kabiri Share this post Link to post
Lars Fosdal 1792 Posted January 12, 2023 It might be a bit banale, but what about a new version of the old app that exports to a json or xml file, and then the new app can import from that json or xml file? Share this post Link to post
kabiri 3 Posted January 12, 2023 This is possible. But at the same time it is impossible. Android phone users have downloaded it from Google Play. If there were private users, this migration would be easy. The problem is that not all users update their app at the same time. Perhaps the best way is to use a database other than sqlite. Or rename the sqlite library (which I don't know how to do) Share this post Link to post
Lars Fosdal 1792 Posted January 12, 2023 What if you in the app, first export to json with UniDAC, then close all Unidac DB conns, and then import with FireDAC? Share this post Link to post
Lars Fosdal 1792 Posted January 12, 2023 On 1/11/2023 at 11:34 AM, kabiri said: The database is encrypted using leAES256 method. FD cannot connect to it. Why can't it connect? Share this post Link to post
kabiri 3 Posted January 12, 2023 1 hour ago, Lars Fosdal said: What if you in the app, first export to json with UniDAC, then close all Unidac DB conns, and then import with FireDAC? Because Delphi cannot deploy two libraries with the same name. 1 hour ago, Lars Fosdal said: Why can't it connect? On Android it stops at the splash screen FD : uni: Share this post Link to post
Lars Fosdal 1792 Posted January 12, 2023 Are you sure there is no way to convince FD to use the appropriate encryption method? Share this post Link to post
kabiri 3 Posted January 12, 2023 I used aes-256 in FD and leAES256 in uni. The only similar option is this. Share this post Link to post
Attila Kovacs 629 Posted January 12, 2023 is updating UniDAC subscription and letting FD joke for the kids an option? Share this post Link to post
Lars Fosdal 1792 Posted January 12, 2023 It is just weird with the message saying that the DB is NOT encrypted? Ref. https://docwiki.embarcadero.com/Libraries/Sydney/en/FireDAC.Phys.SQLite.TFDSQLiteSecurity.CheckEncryption Share this post Link to post
Lars Fosdal 1792 Posted January 12, 2023 There also is a confusing comment here https://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.SQLite_Encryption_Sample Quote The sampe uses TFDSQLiteSecurity.SetPassword to encrypt the database with the password provided. The database password is the combination of <encryption algorythm>:<password>. 1 Share this post Link to post