Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

closing Sqlite db using localStorage QML



  • Dear all,

    I'm working on project using local storage and I would like the application able to be used by multiple user.

    My problem is when I'm execute the application on one station, the database is not accessible to open the application on other station, could you help me.

    the code is the same used in the localstorage qml example but nowhere I saw db.close in the example:

    http://doc.qt.io/qt-5/qtquick-localstorage-example.html

    Thank you very much for your help!!



  • Hi there, i have a question:

    • What you want to say with Station?

    About the connetion, the LocalStorage has mechanics automatilly to open and close connetions to Sqlite database.



  • I put the data base in local server and I need to be able to have 2 or more computers allowed to read/write in the database at the same time



  • @filipdns
    If i'm not mistaken, sqlite is not a database server, but only a small library that use SQL to directly management in the file.

    • Can you not use another database with server service, like Mysql or Postgresql ?

  • Lifetime Qt Champion

    Hi,

    In addition to @KillerSmath, Local Storage, as the name implies is to be used locally on the machine where your application it running.

    If you have a central database that should server multiple clients, you really should consider using a database engine that is meant for that kind of setup.



  • Thank you very much both of you, I will work to this way.

    thanks a lot for your time!!


Log in to reply