Jump to content
Sign in to follow this  
kabiri

[Problem] Convert DB from unidac sqlite to FD sqlite

Recommended Posts

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
  1. well, if you know the "reason", then this way would be the better way to solve this problem. but if dont...
    1. if you can open in UniDAC usage, then, try UniDAC export /import manager
      1. Tutorial to CSV export https://www.sqlitetutorial.net/sqlite-export-csv/  
    2. or, you can use any other "DB Manager" to export it (datas) your database SQLite to any DB used by FireDAC
Edited by programmerdelphi2k
  • Haha 1

Share this post


Link to post

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 by kabiri

Share this post


Link to post

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

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

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
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
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 :

fd1.thumb.png.54e5caaa56993a4d0bc180d44c537044.png

 

uni:

fd2.thumb.png.d533e22922f9fc5d00e01258b24f14c3.png

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×