Android Question Sharing and uploading data with SQLite

Discussion in 'Android Questions' started by LorenzoTRANSFEREX, Feb 11, 2015.

  1. LorenzoTRANSFEREX

    LorenzoTRANSFEREX Member Licensed 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
     
  2. KMatle

    KMatle Expert Licensed 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?)
     
  3. LorenzoTRANSFEREX

    LorenzoTRANSFEREX Member Licensed 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.
     
  4. parijs

    parijs Active Member Licensed User

  5. LorenzoTRANSFEREX

    LorenzoTRANSFEREX Member Licensed User

  6. DonManfred

    DonManfred Expert Licensed 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
     
    Peter Simpson and KMatle like this.
  7. LorenzoTRANSFEREX

    LorenzoTRANSFEREX Member Licensed User

  8. DonManfred

    DonManfred Expert Licensed 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.
     
  9. LorenzoTRANSFEREX

    LorenzoTRANSFEREX Member Licensed User

    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?
     
  10. LorenzoTRANSFEREX

    LorenzoTRANSFEREX Member Licensed 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
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice