Android Question Sqllite & Mysql update local tables

Discussion in 'Android Questions' started by ocalle, Apr 12, 2019.

  1. ocalle

    ocalle Active Member Licensed User

    Hi, I need syncro tables to avoid continuos remote connections.

    by one way i have a mysql server with tables (Im using JRC2 remote connector)
    in the other hand on phone i have the same tables in SQL Lite to allow local operations with common data.
    Did someone know a method to get Mysql tables from server to local Sqllite tables?

    Thank you in advance.
  2. Erel

    Erel Administrator Staff Member Licensed User

    Alternative solution: [B4X] CloudKVS - synchronized key / value store

    You need to download the data and insert it into the local database. If the table data is not too large then you can download the complete table, delete the local table and insert the new table. If the data can be updated both locally and remotely then you need a more sophisticated solution. You can add a "modified time" column and use it for the synchronization. This is implemented in CloudKVS.
    ocalle likes this.
  3. ocalle

    ocalle Active Member Licensed User

    Thank you! @Erel What I did is this:

    1st Create in the server the tables in a database, load the basics with heidisql
    Then in the mobile application I recreate the same empty tables.

    2nd At the beginning of the execution of the app in the day I connect to the Mysql server through the JRCD2 connector with stored procedure commands (which I can change in the server without affecting the mobile application).

    The fact of loading everything the first time in the Sqllite boards avoids later heavy loads, the basic boards go only once.

    3th Then I use the sqllite tables to fill in data forms.

    4 When I make an insert, delete or update I do it in the 2 tables both in the server and in the local table. So that the next day the data remains identical.

    I think cloudkvs is fantastic but I still have a hard time mastering it.
    Translated with (@Informatix courtesy)
    José J. Aguilar likes this.
  4. José J. Aguilar

    José J. Aguilar Well-Known Member Licensed User

    Hey @ocalle, if you could share a small example with this feature I think it would be fantastic!
    ocalle likes this.
  5. ocalle

    ocalle Active Member Licensed User

    Yeah give me sometime, in this week post it
    José J. Aguilar likes this.
  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