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

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 6.1.0 Alpha
    • 4.6.2, 4.6.3
    • SQL Support
    • None
    • b211148e4b4167483e1a78a45ae8fef97e5a4f2d (qt/qtbase/dev)

    Description

      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?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes