I think the problem lies in the TZInterbase6XSQLDAResultSet.Open; method. The ColumnDisplaySize calculation does not take column's collation into account. Instead it takes charsize from the connection's charset.
For example, this SQL gets wrong column sizes for Unicode Delphi and UTF-16 connection:
SELECT C.RDB$CONSTRAINT_NAME, R.RDB$CONST_NAME_UQ, R.RDB$UPDATE_RULE, R.RDB$DELETE_RULE, I1.RDB$RELATION_NAME AS TABLE1, I2.RDB$RELATION_NAME AS TABLE2
FROM RDB$RELATION_CONSTRAINTS AS C
INNER JOIN RDB$REF_CONSTRAINTS AS R ON R.RDB$CONSTRAINT_NAME=C.RDB$CONSTRAINT_NAME AND C.RDB$CONSTRAINT_TYPE='FOREIGN KEY'
LEFT OUTER JOIN RDB$INDICES AS I1 ON I1.RDB$INDEX_NAME=C.RDB$CONSTRAINT_NAME
LEFT OUTER JOIN RDB$INDICES AS I2 ON I2.RDB$INDEX_NAME=R.RDB$CONST_NAME_UQ
Hi which characterset are you using for your database?
Hi, the default database characterset is UTF8 and all text domains have UTF8 as a charset. The problem is highly visible with Firebird's system tables (Firebird 2.5 is used), which has NONE as column's charset.
FYI: of course you are right!
did commit a fix: R3332 \testing-7.2 (SVN)
an my side it works nice now.
Please test and feel free to close your ticket, Joe.
Cheers, Michael
I have tested your fix and it works correctly. Thank you.