Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sqlite connect #114

Open
ChaoII opened this issue Nov 21, 2023 · 1 comment
Open

Sqlite connect #114

ChaoII opened this issue Nov 21, 2023 · 1 comment

Comments

@ChaoII
Copy link

ChaoII commented Nov 21, 2023

Hi,
I have a Qt program that uses the same sqlite3 db as another program, but the other program cannot make changes to the sqlite3 database. What to do?

@QxOrm
Copy link
Owner

QxOrm commented Nov 23, 2023

Hello,

If several programs share the same SQLite database, then you have to close the database connection after each call.

So to manage that with QxOrm library, I would recommend to use the qx::QxSession class : https://www.qxorm.com/qxorm_en/manual.html#manual_370
The destructor of qx::QxSession class will automatically close the database connection.

Or you can do that manually after each call of qx::dao::xxx function using :
qx::QxSqlDatabase::closeAllDatabases()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants