Export and Import SQLite data from LC Project?

Pete pete at mollysrevenge.com
Tue Oct 25 16:17:03 EDT 2011


I don't think there's a built in way to do this in LC, you'd have to write
some code.

Alternatively, if you have sqlite3 on your computer, you could run it from
LC and pass it the necessary commands to dump and restore the db.  To dump
the data, You'd need to send it a .mode command with a mode of insert ( to
create SQL Insert statements), then a .dump command.  To add it back, use
the sqlite3 .read command.  Run sqlite3 and enter .help for more specific
info.

All that assumes the table you are loading data into doesn't already have
the dumped data in it.

Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Tue, Oct 25, 2011 at 12:27 PM, John Patten <johnpatten at mac.com> wrote:

> Hi All…
>
> Is it possible to export data from SQLite database, save it as a file, and
> then import it back into the same database?
>
> I'm looking for a way to allow users of a LC project to save out their data
> in the SQLite database and then sneaker-net it on another machine using the
> same LC application and import into that app's SQLite database.
>
> Is there some SQLite statement that creates a query that I then can have LC
> save out as a file, and then do the reverse, and import it and run the query
> on the second machine?
>
> Thank you!
>
> John Patten
> SUSD
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



More information about the use-livecode mailing list