Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved I have some problems when using a select statement in the bindValue function

    General and Desktop
    3
    3
    126
    Loading More Posts
    • 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.
    • L
      lso70 last edited by

      Qt,sqlquery,bindvalue

      1 Reply Last reply Reply Quote 1
      • mrjj
        mrjj Lifetime Qt Champion last edited by mrjj

        Hi
        Then you should describe the problems, show any errors and
        show the code that has this issue.
        With that level of information, you currently have added, most will simply skip your post.

        here is sample.

         QSqlQuery query;
            query.prepare("INSERT INTO person (id, forename, surname) "
                          "VALUES (:id, :forename, :surname)");
            query.bindValue(":id", 1001);
            query.bindValue(":forename", "Bart");
            query.bindValue(":surname", "Simpson");
            query.exec();
        
        }
        
        1 Reply Last reply Reply Quote 5
        • VRonin
          VRonin last edited by

          Locked as duplicate of https://forum.qt.io/topic/102044/i-have-some-problems-when-using-a-select-statement-in-the-bindvalue-function

          "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 Reply Quote 3
          • First post
            Last post