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

QODBC: NULL flag not reset

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P3: Somewhat important P3: Somewhat important
    • Some future release
    • 4.4.0
    • SQL Support
    • None

      When using an output variable for a stored procedure which is not set (isNull returns true), then the NULL flag is not reset when the call returns.

      QVariant CMyClass::GetValue(QVariant::Type T)
      {
        QSqlQuery Query;
        Query.setForwardOnly(); //Necessary for a stored procdure
        Query.prepare("{call stored_procedure(?)}");
        QVariant V(T);
        Query.addBindValue(V,QSql::Out);
        Query.exec();
        return Query.boundValue(0);
      }
      

      This code always returns a NULL Qvariant.

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

            Unassigned Unassigned
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes