Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. German
  4. Database update statement
Forum Updated to NodeBB v4.3 + New Features

Database update statement

Scheduled Pinned Locked Moved Solved German
13 Posts 4 Posters 4.6k 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.
  • G Offline
    G Offline
    Galilio
    wrote on last edited by
    #3

    Danke
    Mit dem "WEHRE" hast du Recht. Es muss zu "WHERE" korrigiert werden.
    LastError ist eine grosse Hilfe .
    Danke

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #4

      @Galilio Great!. Bitte :)

      157

      1 Reply Last reply
      1
      • G Offline
        G Offline
        Galilio
        wrote on last edited by
        #5

        Hi Danke
        ich bekomme aber immer diese Fehlermeldung"lastError":

        [Microsoft][ODBC-Treiber für Microsoft Access] 27 Parameter wurden erwartet,
        aber es wurden zu wenig Parameter übergeben. QODBC3: Unable to execute statement

        Ich weiss es nicht welche Parameter fehlt.
        Sieht es überhaupt einen Update statement so aus "Wie oben "

        danke

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #6

          @Galilio Yes the update statement works in that way. AFAIK it is not compulsory to update all columns when using update query. Does your table contain 27 columns ?

          157

          1 Reply Last reply
          1
          • G Offline
            G Offline
            Galilio
            wrote on last edited by
            #7

            The table contains 28 columns

            1 Reply Last reply
            0
            • p3c0P Offline
              p3c0P Offline
              p3c0
              Moderators
              wrote on last edited by
              #8

              @Galilio Something strange. The table contains 28 columns, the error shows 27 are expected and you are actually updating 25 which is fine. Are you sure you are looking for correct table ?
              Also can you try updating just 1 column ?

              157

              1 Reply Last reply
              1
              • G Offline
                G Offline
                Galilio
                wrote on last edited by
                #9

                Wie kann ich den query lesen bevor exec()
                z.B:

                QSqlQuery query;
                query.prepare("........");
                query.bindvalue(.....);
                ....
                //und genau hier bevor es "query.exec();" durchgeführt wird, der Inhalt von query lesen.
                query.exec();
                

                Danke

                raven-worxR 1 Reply Last reply
                0
                • G Galilio

                  Wie kann ich den query lesen bevor exec()
                  z.B:

                  QSqlQuery query;
                  query.prepare("........");
                  query.bindvalue(.....);
                  ....
                  //und genau hier bevor es "query.exec();" durchgeführt wird, der Inhalt von query lesen.
                  query.exec();
                  

                  Danke

                  raven-worxR Offline
                  raven-worxR Offline
                  raven-worx
                  Moderators
                  wrote on last edited by
                  #10

                  @Galilio
                  NACH dem exec() aufruf kannst du QSqlQuery::executedQuery() verwenden
                  Oder siehe hier.

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  1 Reply Last reply
                  1
                  • G Offline
                    G Offline
                    Galilio
                    wrote on last edited by
                    #11

                    danke

                    Das Problem lag an einem dumme Tippfehler.

                    danke noch mal

                    J 1 Reply Last reply
                    0
                    • G Galilio

                      danke

                      Das Problem lag an einem dumme Tippfehler.

                      danke noch mal

                      J Offline
                      J Offline
                      joergpauly
                      wrote on last edited by
                      #12

                      @Galilio Setze bitte den Thread auf "Solved".

                      Viele Grüße
                      Jörg

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        Galilio
                        wrote on last edited by
                        #13

                        Wie kann ich den Thread als Solved setzen?

                        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