Updataing Database Remotely

Bill Norris

Active Member
Licensed User
Longtime User
When my app is all said and done. I wish to be able to update the sql .db file without having to connect to a pc. Basically, I am updating the master database on a pc, then exporting to .csv, then importing to sqlite. When complete, I want to send the updated database to the tablet (actually, there will be numerous tablets), so connecting each one to the pc to accomplish this will be quite cumbersome.

Thanks,
Bill
 

DouglasNYoung

Active Member
Licensed User
Longtime User
Bill,
Another option to consider might be to hold the updated SQLite database on an internet server, instead of a PC, from where the data could easily be downloaded to many tablets by using the httputils library and 'HttpUtils.Download'.
Depending on your app this could be implemented in various ways:
- Automatically by time interval
- Manually
Both these could be further enhanced by using a small PHP, or other Server Side Script, to compare dates, provide some rudimentary security and only down load the data if required.

My preference is a two stage approach where the app automatically sends a request to a PHP page which compares the dates of the installed database versus the update database, with some user ID for authentication. The PHP sends back one of three simple keywords (UPDATE, NOTRQD; BADUID) only when UPDATE is returned then the user can be presented with an option to download the new data and choose a suitable time.

Hope this helps,
Douglas
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…