How to export SQLite datas into PostgreSQL (same table structure)

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

How to export SQLite datas into PostgreSQL (same table structure)

Post by swierzbicki » Tue 11 Aug 2015 16:08

Hello,

I need to transfert SQLite datas into PostgreSQL.
Both database does have the same table structure, fields names, fields type...

When dumping SQLite Database (TUniDump), Boolean fields value are exported as integer values. SQL script cannot be executed under PostgreSQL as boolean fields should be exported as TRUE or FALSE.

In my case, dump sounds not like the way to go. What will you advise me ?

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: How to export SQLite datas into PostgreSQL (same table structure)

Post by MaximG » Wed 12 Aug 2015 08:29

To transfer data between different databases You can try to compose your own application, in which logic of processing of different data types would be implemented. In this case, the TCRBatchMove component might be useful, as it allows data transfer between various datasets. Its detailed description is available at our website: https://www.devart.com/unidac/docs/?dev ... chmove.htm . In addition, to solve this task, you can use the TUniLoader component: https://www.devart.com/unidac/docs/?dev ... loader.htm

swierzbicki
Posts: 451
Joined: Wed 19 Jan 2005 09:59

Re: How to export SQLite datas into PostgreSQL (same table structure)

Post by swierzbicki » Thu 13 Aug 2015 16:15

Thank you for the tip. This is so far (in my early test) well working.

Post Reply