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 many transaction can i open with one database?

How many transaction can i open with one database?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 901 Views 1 Watching
  • 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.
  • Taz742T Offline
    Taz742T Offline
    Taz742
    wrote on last edited by Taz742
    #1

    How many connection can I open with one database? I have a client and server, when client connects to this server i send information to it. Also i have a service which uses this database, INSERT, UPDATE and DELETE queries in this database are often executed from various classes. I use Firebird base.

    I mean:

    if (db.open) {
       db.driver()->begintranTransaction();
       QSqlQuery query;
       //write something
       if (!query.exec ) {
           db.driver()->rollbackTransaction();
       } else {
           db.driver()->comitTransaction();
        }
    }
    

    Do what you want.

    jsulmJ 1 Reply Last reply
    0
    • Taz742T Taz742

      How many connection can I open with one database? I have a client and server, when client connects to this server i send information to it. Also i have a service which uses this database, INSERT, UPDATE and DELETE queries in this database are often executed from various classes. I use Firebird base.

      I mean:

      if (db.open) {
         db.driver()->begintranTransaction();
         QSqlQuery query;
         //write something
         if (!query.exec ) {
             db.driver()->rollbackTransaction();
         } else {
             db.driver()->comitTransaction();
          }
      }
      
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Taz742 With which database? It depends on the database server not Qt.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      Taz742T 1 Reply Last reply
      3
      • jsulmJ jsulm

        @Taz742 With which database? It depends on the database server not Qt.

        Taz742T Offline
        Taz742T Offline
        Taz742
        wrote on last edited by
        #3

        @jsulm
        I update my question. I need transaction not connection. Sorry.

        Do what you want.

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Taz742 said in How many transaction can i open with one database?:

          Firebird

          For Firebird for 2.5 and earlier its signed 32 bit integer
          giving around 2^31 for maximum.

          It depends on the (native) database driver etc. Not Qt :)

          Taz742T 1 Reply Last reply
          3
          • mrjjM mrjj

            @Taz742 said in How many transaction can i open with one database?:

            Firebird

            For Firebird for 2.5 and earlier its signed 32 bit integer
            giving around 2^31 for maximum.

            It depends on the (native) database driver etc. Not Qt :)

            Taz742T Offline
            Taz742T Offline
            Taz742
            wrote on last edited by
            #5

            @mrjj You made me very happy :)

            Do what you want.

            1 Reply Last reply
            1

            • Login

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