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. instead of writing queries for inserting ,update ,edit,and delete, i want to write a stored procedure in qt application?
Qt 6.11 is out! See what's new in the release blog

instead of writing queries for inserting ,update ,edit,and delete, i want to write a stored procedure in qt application?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.3k 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
    #1

    Instead of writing queries for inserting ,update ,edit,and delete, i want to write a stored procedure in qt application using qt5 in Ubuntu 16 and MS SQL server....

    jsulmJ 1 Reply Last reply
    0
    • V veera

      Instead of writing queries for inserting ,update ,edit,and delete, i want to write a stored procedure in qt application using qt5 in Ubuntu 16 and MS SQL server....

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @veera SQL stored procedures are not related to Qt. Take a look at MS SQL Server documentation to see how to write them.

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

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

        okay...how should i call stored procedure in qt application....

        1 Reply Last reply
        0
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by VRonin
          #4
          QSqlQuery query(db);
          query.setForwardOnly(true);
          query.prepare("{CALL myStoredProc(:myarg) }");
          query.bindValue(":myarg", 1234);
          if (query.exec()){
          
          }
          

          see "Binding values to a stored procedure:" section of http://doc.qt.io/qt-5/qsqlquery.html#approaches-to-binding-values

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

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

            okay i will try thank u so much @VRonin .....

            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