i started to use zeos with firebird recently (after forget ibx), all was fine, until now.
i have a select like this:
select t1.someStringField, t2.someFloatField*t1.someIntField as someName
from TABLE1 t1
left outer join TABLE2 t2 on ... etc.
when i open the query, the DataType of the second field will be ftInteger, instead of ftFloat!

but if i remove the first field from the select (t1.someStringField), the DataType will be ftFloat, which is correct!
another solution is to exchange the order of fields in t2.someFloatField*t1.someIntField to t1.someIntField*t2.someFloatField. it will also give me ftFloat, nice.
i debugged a bit, and found the method TZAbstractResultSetMetadata.ReadColumnByName where things go wrong:
Code: Select all
if not TableColumns.IsNull(5) then
ColumnInfo.ColumnType := TZSQLType(TableColumns.GetInt(5));
before the above line, the ColumnInfo.ColumnType is ok (float), but it overwrites it to integer, don't really understand why?
i have ton's of sql's, so please don't tell me to review all of them.

thanks