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

Array read/write doesn't work in QIBASE Driver

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.2
    • Fix Version/s: None
    • Component/s: SQL Support
    • Labels:
      None
    • Platform/s:
      All

      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

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

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There is 1 open Gerrit change