Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. local database back up if connection not found

local database back up if connection not found

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
13 Posts 3 Posters 2.5k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    filipdns
    wrote on last edited by
    #1

    Hello,

    I would like use qml + js to work with database but I know how to do locally and now I want to do if with server but keep a back up to use the local one in case the connection is missing, any one can give me script for that?

    Thank a lot
    Philippe

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      If I understand you correctly, you want to keep a copy of the remote database locally in case the network goes down ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • F Offline
        F Offline
        filipdns
        wrote on last edited by
        #3

        yes exactly

        1 Reply Last reply
        0
        • F Offline
          F Offline
          filipdns
          wrote on last edited by
          #4

          And no error in case the network goes down, just the api still working with the local database and only an advise to inform we are in local using and soon the network go back online, update it with le lastest version

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Then you should rather do "offline first", i.e. save everything in your local database and then send things remotely.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • F Offline
              F Offline
              filipdns
              wrote on last edited by
              #6

              oh, ok then bad news, because in case I'm use an other computer, I will overwrite the online database and have risk to copy older one replacing the latest one

              1 Reply Last reply
              0
              • F Offline
                F Offline
                filipdns
                wrote on last edited by
                #7

                I'm little bit stupid, of course it will overwrite, discard this last post lol

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Are you looking for something working like Firebase ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • F Offline
                    F Offline
                    filipdns
                    wrote on last edited by
                    #9

                    yes, I need to be able to use the API any time, connection or not

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Then QtDataSync project might be of interest.

                      WARNING I haven't tested it, just did a quick search on the theme.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • F Offline
                        F Offline
                        filipdns
                        wrote on last edited by
                        #11

                        thank you very much! I will try that and will post comments here in case somebody else need the same thing

                        1 Reply Last reply
                        0
                        • Pablo J. RoginaP Offline
                          Pablo J. RoginaP Offline
                          Pablo J. Rogina
                          wrote on last edited by
                          #12

                          @filipdns it looks like you're posting a problem related to database replication and not regarding Qt itself. I mean, you may rely on replication from the DB engine(s) you're using (i.e. Oracle, PostgreSQL, even there's replication based on sqlite) so I'd try setting up a good replication schema of replication between the central server and your PCs and then make Qt application always connect locally to DB, and all the DB synchronization will be carried on magically by the DB engine...

                          Upvote the answer(s) that helped you solve the issue
                          Use "Topic Tools" button to mark your post as Solved
                          Add screenshots via postimage.org
                          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                          1 Reply Last reply
                          0
                          • F Offline
                            F Offline
                            filipdns
                            wrote on last edited by
                            #13

                            Oh yes you are right, I didn't think To this side thank you

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved