Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Concurrent database access coding
Forum Updated to NodeBB v4.3 + New Features

Concurrent database access coding

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 301 Views 2 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.
  • T Offline
    T Offline
    Tom831
    wrote on last edited by
    #1

    We have a program written in Qt that accesses a local Qt SQL database stored on the local hard drive.

    I'd like to get an idea of what's involved to modify the program to allow for the database to be stored on a shared volume and concurrently read/write accessed by instances of the program running on several computers.

    Thanks!

    Tom

    JonBJ 1 Reply Last reply
    0
    • T Tom831

      We have a program written in Qt that accesses a local Qt SQL database stored on the local hard drive.

      I'd like to get an idea of what's involved to modify the program to allow for the database to be stored on a shared volume and concurrently read/write accessed by instances of the program running on several computers.

      Thanks!

      Tom

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @Tom831
      Unfortunately you say nothing about which SQL database back-end you use. If it's SQLite I believe that does not support shared-concurrent access from multiple clients. You will want to use something like MySQL for that, which has a server running on the machine hosting the physical database file. You can then have multiple clients accessing it simultaneously. You will want to learn about transactions to support simultaneous updates, and code accordingly. Qt SQL libraries do support transactions.

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

        Hi,

        Beside @JonB excellent advices, concurrent shared access of SQLite files on network drives is highly discouraged.

        See the official SQLite documentation chapter on this matter.

        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
        2

        • Login

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