Error with FLOAT in user-defined types

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jdorlon
Posts: 112
Joined: Fri 05 Jan 2007 22:07

Error with FLOAT in user-defined types

Post by jdorlon » Thu 24 May 2018 18:35

Hello,

If I create the following objects:

Code: Select all

drop table TBL_WITH_FLOAT_SUBTYPE purge;
drop type T_FLOAT_DATA;

CREATE OR REPLACE TYPE T_FLOAT_DATA Authid current_user AS object
(
 minx float(64),
 miny float(64)
);
/

CREATE TABLE TBL_WITH_FLOAT_SUBTYPE
(
 A NUMBER,
 B NUMBER,
 C NUMBER,
 FLOAT_DATA T_FLOAT_DATA
);

Insert into TBL_WITH_FLOAT_SUBTYPE
 (A, B, C, FLOAT_DATA )
 Values
 (1, 2, 3, T_FLOAT_DATA (1,2));

COMMIT;
Then do a "Select * from TBL_WITH_FLOAT_SUBTYPE " in a TSmartQuery, I get an error about "unknown type for MINX".

I have discovered that if I edit TOraType.DescribeAttribute, in OraObjects.pas, adding "SQLT_FLT," right before OCI_TYPECODE_INTEGER in the case statement, then the problem goes away.

Is this the correct solution? If so, please include it in the next version. If not, please let me know what the correct solution is. Thank you.

MaximG
Devart Team
Posts: 984
Joined: Mon 06 Jul 2015 11:34

Re: Error with FLOAT in user-defined types

Post by MaximG » Fri 25 May 2018 10:35

Thank you for the information. We have reproduced the problem and fixed the bug. The fix will be included in the next ODAC build. Currently, we can send you a night build of ODAC with the fix. For this, please specify your license number and the exact version of Delphi you are using via the e-support form (https://www.devart.com/company/contactform.html)

Post Reply