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
Forum Updated to NodeBB v4.3 + New Features

Problems using sql bindvalue in QT 5.1

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 779 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.
  • D Offline
    D Offline
    diego
    wrote on 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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

      • Login

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