Retrieving An Online Data Update

RichardN

Well-Known Member
Licensed User
Longtime User
I have a project in mind that is data dependant and uses an SQLite database that has to reside on the device. I would like to check at first-run for a data connection and download a newer database if one is available.

As there are many ways of managing that process I am open to suggestions. Are there any project examples here that demonstrate the most code/device efficient way of doing this ?
 

RichardN

Well-Known Member
Licensed User
Longtime User
Max size about 400kb. Unfortunately the db will be accessed primarily in situations where internet access is impossible so a MySQL solution is out of the question.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I asked about the database size so I can better suggest you a "download" method.

There are several ways to implement such a solution.
You should have a version table with a single field which is the database version. When your program starts you should download a simple text file that contains an integer which represents the most recent database version.
The program should then compare it to the device database version and if it is lower than you should close the SQL connection, download the new database and reopen the connection.

I recommend you to use HttpUtils2 for the communication.
 
Upvote 0

lamsri799

Member
Licensed User
Longtime User
do you have example code or project ?
can you help me please.
i have project for graduation deadline at tomorrow.
i have My project offline
i want to sync database in application to database server when i connect internet (auto sync )
i have hosting
please help me
and sorry for my language
i use English Language not well
thank you very much. Erel
:(
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
i have project for graduation deadline at tomorrow.
Sorry, but this is NOT our problem. You are a bit late to ask for help i would say in this case.

If you need a httputils example: search the forum. You´ll find hundrets

PS: This is an old thread. Please start a new Thread for your problem describing your problem and the problem you have showing your code
 
Upvote 0
Top