Distinguish between aggregates and INTEGER

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tdtappe
Posts: 2
Joined: Thu 06 Oct 2005 08:14

Distinguish between aggregates and INTEGER

Post by tdtappe » Thu 06 Oct 2005 08:36

I use a TOraQuery (5.50) "only" as a layer between my own db access components and an Oracle database. Sometimes I have to adjust the FieldType to be compatible with other database backends. But there's one problem left: I cannot distinguish between an INTEGER declared column and for instance a SUM of some numeric column. Both are converted to float fielddefs with a precision/scale of (38, 0). But I would like to have the INTEGER column be converted to an IntegerField whereas the aggregation should be converted to a FloatField.
BTW, I think there must have been some changes between ODAC 3.50 and 5.50 concerning this subject. Because I didn't have any problems with 3.50.

Any ideas?

--Heiko

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Mon 10 Oct 2005 13:59

When you declare INTEGER field in Oracle, its precision and scale are set to 38 and 0 accordingly. Delphi Integer type can't contain such large numbers, so that is why ODAC maps this field to TFloatField.

Post Reply