DECFLOAT not support
Zeki-Gursoy opened this issue · 10 comments
I get "not yet implemented" error. I think ODBC driver 3 can't support DECFLOAT data type. When support it?
Hi @Zeki-Gursoy , @mariuz
You can try 3.0.0.8 build -> https://github.com/FirebirdSQL/firebird-odbc-driver/wiki
New FB4+ types are supported in compatibility mode:
- int128-like types are treated as varchars
- decfloat types - as double precision (with possible precision loss)
- with timezone - as without timezone
I will think about native support in the future, but now it's the only way to get a quick win.
Regards
(noticed just now previous comment, works as described)
Following sql returns value 20, but data type is string. This was changed in 3.0.0.8, now it works. 3.0.0.7 returned not yet implemented.
select
(10/10+1)*10 as fmtBcd
from
rdb$database
Hi
Well, is it good or bad?..)))
If your question is "why the type is string", the answer is - cause int128-like types are treated as varchars.
I'm 99% sure that fmtBcd resolves to Numeric or Decimal with size > 18.
Seems to be int128, so ignore my comment. Works nicely as varchar
Dear @irodushka, now works. Thank you for this ODBC driver.
select cast(123 as int128) "new int128", cast('123.45' as DECFLOAT(34)) "new decfloat", cast(current_timestamp as timestamp with time zone) "new timezone" from rdb$database
@Zeki-Gursoy , @samihanhikoski
Can you please take a look at the 3.0.0.9 build? I've added a compatibility binds settings to the DSN setup dialog (for windows)
It looks like:
If you check the "Enable FB4+ compatibility mode" box, there are 2 options:
- If "Set bind" text field is empty, the default rules are applied (int128 to varchar;decfloat to legacy;time zone to legacy)
- If "Set bind" text field is NOT empty, it must contain your custom binding settings - for example, "int128 to bigint", or "int128 to double precision; decfloat to numeric"
If the "Enable FB4+ compatibility mode" box is NOT checked, all the types are processed in the native mode and you may engage the incompatibility/not support issues working with the new FB4+ types.
These settings affects FB4+ connections only. If you're connecting to FB3 or older, they make no sense at all.
Regards
@irodushka, I tested with Excel external data query.
This is working, too. Even "Set Bind" box is empty but, "Enabled" checked. If unchecked, "not yet implemented" message.
I think, driver completed succesfully.