Page 1 of 1

Disconnected apps

Posted: Thu Sep 01, 2016 2:49 pm
by AlphaBase
Does LC support the concept of disconnected applications? Where the user first downloads a larger (or smaller) data set and stores it locally on the device in SqlLite, so that when the user is not connected to the server, the data is available locally.

If so, could someone point me to documentation?

Thank you

Re: Disconnected apps

Posted: Sat Sep 03, 2016 4:21 pm
by AndyP
Assume this is MySQL to SQLite. You can do this by dumping the the complete Mysql structure and data and then converting the sql commands in the dump to create a new local SQLite local db.

OR

An easier approach would be to store a SQLite db in DropBox.
Your app would then just need to download the latest version of the db from DropBox into the users local DropBox folder when it starts up and upload the local SQLite file from the users DropBox account as changes are made.


There is an active thread and links to a great DropBox library here

http://forums.livecode.com/viewtopic.ph ... it=dropbox

that you might find interesting.

Re: Disconnected apps

Posted: Sat Sep 03, 2016 4:42 pm
by FourthWorld
Good link, Andy - thanks.

@AlphaBase: LC handles local file I/O quite flexibly. To find the path to folders that allow access on mobile devices see the specialFolderPath function in the Dictionary.

Re: Disconnected apps

Posted: Sun Sep 04, 2016 2:36 pm
by Mikey
Hello again, Alpha.
Yes, everything I write is written this way. You copy the initial DB with the app in the "Copy files" pane in the Standalone Application Settings, and then you connect periodically either to an online DB (e.g. a mySQL server), or use something like Dropbox to exchange data (my preferred method).