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. How to solve the error of "connection 'MSSQL' is still in use, all queries will cease to work"?

How to solve the error of "connection 'MSSQL' is still in use, all queries will cease to work"?

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 4 Posters 2.0k 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.
  • V Offline
    V Offline
    veera
    wrote on last edited by veera
    #1

    QSqlDatabasePrivate::removeDatabase: connection 'MSSQL' is still in use, all queries will cease to work.
    QSqlDatabasePrivate::addDatabase: duplicate connection name 'MSSQL', old connection removed.
    open DB

    K 1 Reply Last reply
    0
    • V veera

      QSqlDatabasePrivate::removeDatabase: connection 'MSSQL' is still in use, all queries will cease to work.
      QSqlDatabasePrivate::addDatabase: duplicate connection name 'MSSQL', old connection removed.
      open DB

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @veera

      1. Please change the title to something more comprehensive and do not continue to post simpy error messages.
      2. Give a couple of details what you are actually trying to achieve.
      3. Possibly a short section of code may help to give others an understanding of your goal.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

        In addition to @koahnig said, looks like you are trying to open the DB connection from two places in your code. Hence getting into this issue.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply
        3
        • V Offline
          V Offline
          veera
          wrote on last edited by
          #4

          How to fix the errors please explain me.......

          1 Reply Last reply
          0
          • EddyE Offline
            EddyE Offline
            Eddy
            wrote on last edited by Eddy
            #5

            @veera

            If you show us the code where it goes wrong, then we could help you.

            Eddy

            Qt Certified Specialist
            www.edalsolutions.be

            1 Reply Last reply
            0
            • V Offline
              V Offline
              veera
              wrote on last edited by
              #6

              yes you are right .....i have fixed this error. i have opened the connection twice.....thanks @dheerendra ....

              1 Reply Last reply
              0
              • dheerendraD Offline
                dheerendraD Offline
                dheerendra
                Qt Champions 2022
                wrote on last edited by dheerendra
                #7

                @veera "How to fix the errors please explain me......."

                please note that people in this forum are giving you the solution based on the problem statement you explain. Based on your error message I suggested possible condition. Without you sharing the code no body can help you to fix the problem. Your response to my suggestion looked harsh to me. Be polite & people are helping here based on their interest.

                Dheerendra
                @Community Service
                Certified Qt Specialist
                http://www.pthinks.com

                V 1 Reply Last reply
                3
                • dheerendraD dheerendra

                  @veera "How to fix the errors please explain me......."

                  please note that people in this forum are giving you the solution based on the problem statement you explain. Based on your error message I suggested possible condition. Without you sharing the code no body can help you to fix the problem. Your response to my suggestion looked harsh to me. Be polite & people are helping here based on their interest.

                  V Offline
                  V Offline
                  veera
                  wrote on last edited by
                  #8

                  @dheerendra
                  I am really sorry for that....i am opening database connection in qt application as well as trying to open in QtRPT reporting tool also ... i have commented in database connection code in QtRPT tool....it works for me ...... I was making a report using QtRPT tool........

                  K 1 Reply Last reply
                  0
                  • V veera

                    @dheerendra
                    I am really sorry for that....i am opening database connection in qt application as well as trying to open in QtRPT reporting tool also ... i have commented in database connection code in QtRPT tool....it works for me ...... I was making a report using QtRPT tool........

                    K Offline
                    K Offline
                    koahnig
                    wrote on last edited by koahnig
                    #9

                    @veera said in How to solve the error of "connection 'MSSQL' is still in use, all queries will cease to work"?:

                    QtRPT

                    Almost any answer within this forum may be crytal ball reading to your problems. As also @dheerendra iterated and others including myself have asked for some code samples showing were your problem is. QtRPT is not Qt and simply using Qt libraries as many other software and tools. You might be lucky and there is a user of QtRPT in this forum, but your chances are much better to address your questions in the QtRPT forum.

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    1
                    • V Offline
                      V Offline
                      veera
                      wrote on last edited by
                      #10

                      yes it is a reporting design tool.....

                      1 Reply Last reply
                      0

                      • Login

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