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

Array read/write doesn't work in QIBASE Driver

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.2
    • 5.14.2
    • SQL Support
    • None
    • All
    • 13fe0ab5de63871cdacd41a68608b97b29edb89d (qt/qtbase/dev) 17d390ec37b510ad0cd2684dc01d3285de63bd82 (qt/qtbase/5.15)

    Description

      Accessing array data from a firebird database (tested with 3.0.4) doesn't work with the current implementation of QIBASE driver.
      On insert with parameters the error
      -205 "column is not defined in table <tablename> Could not find array"
      is issued. As you can see the column name is missing.
      The reason for this is the line 844 in qsql_ibase.cpp (Qt 5.14.2) in the function QIBaseResultPrivate::writeArray
      the statement
      QByteArray sqlname(inda->sqlvar[column].aliasname, inda->sqlvar[column].aliasname_length);
      should read
      QByteArray sqlname(inda->sqlvar[column].sqlname, inda->sqlvar[column].sqlname_length);

      The same code is in function
      QIBaseResultPrivate::fetchArray
      which would result in same error, if you use a select for an array.

      The enclosed example program creates a table on the firebird sample database employee. (An empty database will do it also.)
      It tries to insert data into an array column which fails.

      Attachments

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

        Activity

          People

            andysh Andy Shaw
            jonjonas681 Johann Anhofer
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes