Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.14.2
-
None
-
-
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.