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. When using the qxorm plugins to control the qsqldatabase occured the errors.
Forum Updated to NodeBB v4.3 + New Features

When using the qxorm plugins to control the qsqldatabase occured the errors.

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 159 Views
  • 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.
  • nicker playerN Offline
    nicker playerN Offline
    nicker player
    wrote on last edited by
    #1

    here's the errored tips.i dont konw what i should do.
    how to stop and close the database by using the default way of the qxorm or qsqldatabase?

    QSqlDatabasePrivate::removeDatabase: connection '{ffa49827-2e9f-4b24-9aca-ddba09dd0142}' is still in use, all queries will cease to work
    
    JonBJ 1 Reply Last reply
    0
    • nicker playerN nicker player

      here's the errored tips.i dont konw what i should do.
      how to stop and close the database by using the default way of the qxorm or qsqldatabase?

      QSqlDatabasePrivate::removeDatabase: connection '{ffa49827-2e9f-4b24-9aca-ddba09dd0142}' is still in use, all queries will cease to work
      
      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @nicker-player
      You either have a query still active when you attempt to close the database, or perhaps you have kept a QSqlDatabase instance in existence and then are exiting your program. Check https://doc.qt.io/qt-6/qsqldatabase.html#details

      Warning: It is highly recommended that you do not keep a copy of the QSqlDatabase around as a member of a class, as this will prevent the instance from being correctly cleaned up on shutdown. If you need to access an existing QSqlDatabase, it should be accessed with database(). If you chose to have a QSqlDatabase member variable, this needs to be deleted before the QCoreApplication instance is deleted, otherwise it may lead to undefined behavior.

      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