Page 1 of 1

Error with FLOAT in user-defined types

Posted: Thu 24 May 2018 18:35
by jdorlon
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.

Re: Error with FLOAT in user-defined types

Posted: Fri 25 May 2018 10:35
by MaximG
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)