Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-38891

QSqlQuery bindValue() has different behaviour in previous version

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.3.0 RC1
    • Fix Version/s: 5.12.0 Beta 4
    • Component/s: SQL Support
    • Labels:
      None
    • Commits:
      2b682972c2266e52b1510080a56b574e9ffd4db0 (qt/qtbase/5.12)

      Description

      when I was trying Qt 5.2, querying a SQLITE3 db filtering on BOOL field gave me correct result:
      QSqlQuery query;
      query.prepare("SELECT * FROM myTable WHERE boolFilter = :filter");
      query.bindValue(":filter", myFilterValue);

      trying the same code using Qt 5.3rc query returns no record; trying this code it starts again to work:
      query.bindValue(":filter", myFilterValue ? "true" : "false");

      I think it was correct before version 5.3

        Attachments

        For Gerrit Dashboard: QTBUG-38891
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            mabrand Mark Brand
            Reporter:
            alterx Giovanni Romano
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes