Export database to XML and import from it

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
bairog
Posts: 120
Joined: Mon 29 Apr 2013 09:05

Export database to XML and import from it

Post by bairog » Tue 27 May 2014 13:03

I use dotConnect for SQLite 5.2.146 + Entity Framework 6.1.0 and Code-First approach.

How can I export database data to XML (or some other format) and import from it?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Export database to XML and import from it

Post by Shalex » Thu 29 May 2014 13:51


bairog
Posts: 120
Joined: Mon 29 Apr 2013 09:05

Re: Export database to XML and import from it

Post by bairog » Fri 30 May 2014 05:42

Thx.

What will happend if I restore only data from a backup (made with DumpMode.Data flag) to a database which have more tables/more fields in some table?
I mean will it be ok to restore data from previous database version to database of current version (which appeared after migrating for example)?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Export database to XML and import from it

Post by Shalex » Mon 02 Jun 2014 06:13

The compatibility of the dump depends on the schema changes implemented. We recommend you to open the script generated by SQLiteDump and check whether it is compatible with the new database schema.

bairog
Posts: 120
Joined: Mon 29 Apr 2013 09:05

Re: Export database to XML and import from it

Post by bairog » Tue 03 Jun 2014 04:31

Shalex wrote:The compatibility of the dump depends on the schema changes implemented.
My question is about database growth for now (adding new tables/adding rows to existing table).

And I'm afraid I do not understand exactly what you mean by
Shalex wrote:open the script generated by SQLiteDump and check whether it is compatible with the new database schema.
Do you mean trying to restore SQLiteDump and if it does not fail - so this dump "is compatible with the new database schema".
Or do you mean something else?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Export database to XML and import from it

Post by Shalex » Wed 04 Jun 2014 15:07

bairog wrote:Do you mean trying to restore SQLiteDump and if it does not fail - so this dump "is compatible with the new database schema".
Yes, I do. SQLiteDump.Backup() generates SQL statements in a text format (see SqlDump.DumpText). This script will be executed on SQLiteDump.Restore().

Post Reply