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. Problems using sql bindvalue in QT 5.1

Problems using sql bindvalue in QT 5.1

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 766 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.
  • D Offline
    D Offline
    diego
    wrote on 2 Aug 2013, 13:56 last edited by
    #1

    the code below works in qt 4.8
    @
    QSqlQuery query(db);
    qint32 id = 1;
    query.prepare(QString("SELECT image_id, name FROM backgrounds WHERE id = :id"));
    query.bindValue("id", id);
    query.exec();
    @

    the “query.executedQuery()” return “SELECT image_id, name FROM backgrounds WHERE id = ?”
    instead "SELECT image_id, name FROM backgrounds WHERE id = 1"

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 2 Aug 2013, 22:08 last edited by
      #2

      Hi,

      This sounds like a bug, did you check the "bug report system":bugreports.qt-project.org/issues/ ?

      If nothing's there you can try to ask on the interest mailing list, you'll find Qt's developers/maintainers there (this forum is more user oriented) and maybe open a bug report (don't forget to add you OS, Qt versions etc...)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      2/2

      2 Aug 2013, 22:08

      • Login

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