Android Question Sharing and uploading data with SQLite

LorenzoTRANSFEREX

Member
Licensed User
Longtime User
Hi, I am looking a solution for this but I don't find it in the forums.

I built an b4a app which at start download a SQLite db from http to use locally and refresh data by this way.
For reading data locally works fine, but if I wish add a record from app and update the source db from http, how can I do that?
Keep in mind several users could update data at same time.

I hope somebody understand me.

thanks

Lorenzo
 

KMatle

Expert
Licensed User
Longtime User
I prefer MySql on the server side. With httputils and php you can easy access the db and synchronize both db's. Do you have a server with php & MySql?

Where does the sqlite db (which you download) come from? (uploaded from where and who/what stored data in it before?)
 
Upvote 0

LorenzoTRANSFEREX

Member
Licensed User
Longtime User
Yes, of course. But the MySql from my hosting is restricted to local use, is not for external use for security reasons.
I am looking a solution with SQLite because of that.
Actually I upload the sqlite db from my pc to http, and the b4a app download it at start.
If I want to add or update any data in db, I must do it in pc with sqlite tool and upload again to http, to let the apps connected can download it again.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Most probably Dropbox Sync will not help.

You need to have an RDC (or kind of php-bridge) running on your webhosting which recieves new databaseentries and write them in the db.

Maybe you need to find a hoster where you can access the database from outside. This can make some things easier. But with more risk
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
And Dropbox Datastores? Is not designed for these functionality?
Yes. But you are highly limited in the amount of database-records in a table. Even if you have a Dropbox PRO-Account (like me).

And due to "no interest" into my library which i released in betastadium i did not follow it more and did no more investigations in this.
 
Upvote 0

LorenzoTRANSFEREX

Member
Licensed User
Longtime User
Yes. But you are highly limited in the amount of database-records in a table. Even if you have a Dropbox PRO-Account (like me).

And due to "no interest" into my library which i released in betastadium i did not follow it more and did no more investigations in this.

Sorry, I'm just trying to run your directions with your library. At this moment I am not able to initialize the datastore.
Stop my work? I find it very useful and interesting if it really works...
Mi db it's very tiny. What are the records limit that you say?
 
Upvote 0

LorenzoTRANSFEREX

Member
Licensed User
Longtime User
I found this information in Dropbox about limits:
Maximum record size100 KiB
Maximum number of records per datastore100,000
Maximum datastore size10 MiB
Maximum size of a single sync() call2 MiB


Actually my sqlite db has a size of 8Kb, I think 10Mb limit could be enough for me.

Did you recomend me I go on with your Dropbox library?
I have not choice to use another kind of database server like mysql or sql server...

Thanks
 
Upvote 0
Top