1

I have an application using:

QString databasePath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
    databasePath += "/MyApp.db";
    qApp->setProperty("MYAPP_DATABASE_PATH", databasePath);

to create a path for the database

Is there a way to make another application use the same path to access the same database?

Gabriel_Br
  • 119
  • 1
  • 9

1 Answers1

0

From SQlite FAQ:

SQLite uses reader/writer locks to control access to the database. (Under Win95/98/ME which lacks support for reader/writer locks, a probabilistic simulation is used instead.) But use caution: this locking mechanism might not work correctly if the database file is kept on an NFS filesystem. This is because fcntl() file locking is broken on many NFS implementations. You should avoid putting SQLite database files on NFS if multiple processes might try to access the file at the same time. On Windows, Microsoft's documentation says that locking may not work under FAT filesystems if you are not running the Share.exe daemon. People who have a lot of experience with Windows tell me that file locking of network files is very buggy and is not dependable. If what they say is true, sharing an SQLite database between two or more Windows machines might cause unexpected problems.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241