Report: import .dump.text in a .sqlite file

This follows a previous discussion here (that do not have a conclusion ?)

I just created a special one button project to import a .dump.txt file into a .sqlite file.

Everything works fine even if the INSERT INTO syntax appears strange to my eyes:

INSERT INTO "Phone_Book" VALUES('CMS Bourse-Esplanade-Krutenau - 67000','','','','','','15, Rue de Genve','','67000','Strasbourg','03-68-98-51-40','','','','','','',1);

The example in Xojo includes the TABLE Columns names.

BTW: the code uses a TextInputStream, read a line at a time and execute what it is found (FOREIGN KEY, BEGIN TRANSATION, CREATE TABLE with all my Columns and INSERT INTO all my (exported) Records.

For more details on .dump, read:
https://sqlite.org/cli.html#converting_an_entire_database_to_an_ascii_text_file

I generated my .dump.txt file using the Terminal on El Capitan.

I would write Eureka, but, I do not know what to do with that information, so now you know too.

Enjoy (eventually).

You know you can use the CLI commands the MBS Plugin?

See InternalSQLiteLibraryMBS.Shell method.

An INSERT INTO statement does not require the Column names IF the value statement accounts for ALL columns and is in the same physical order as the fields in the table…

NOTE : that last requirement cannot be guaranteed which is why normally one would always specifiy the column names/order

What is “the last requirement” ?

This was new to me because the LR does not expose this syntax. That is why I created the project.

That the fields are in the order of the value statement… other processes may or may not have altered the tables … so it is never safe to assume the field order is constant