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

Driver for ODBC - qsql_odbc.cpp should use the QMetaType:float when sql type is SQL_FLOAT instead of QVariant::Double

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.1.0 Alpha
    • 4.6.2, 4.6.3
    • SQL Support
    • None
    • b211148e4b4167483e1a78a45ae8fef97e5a4f2d (qt/qtbase/dev), 7f24d8952 (dev), 20b5d3d0e (6.10), 6084f1d45 (6.9), c083f18bd (tqtc/lts-6.8)

      Currently a float must be cast to a double to be save to the database via a QSqlQuery

      query.addBindValue( QVariant(f) ); with f being a float, this fails

      to make it work we need:
      query.addBindValue( QVariant(double(f)) );

      The float should be valid there.

      Maybe by using QVariant::Private as the type?

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

            chehrlic Christian Ehrlicher
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes