Oracle Union Delphi Fieldtype

ROLF

Member
Hi,
We have installed our first version of Oracle 9.2.0.8 and discovered a serious problem with SQL-statements which use views in conjunction with unions.
Some field of the view have changed their datatype from number to number(4), which translates to integer.
At runtime this is detected by the DOA components who raise an error like float expected but integer found.
We use delphi 6, our customers use oracle from version 8.1.7 to 9.2, or program is very big and it's not possible to manage each situation in all modules.

Is there any solution which avoids to change a lot of modules and allow to grant compatibility code between different version of Oracle ?

Greetings
Rossi Raffaele - APIASA
 
This is indeed a compatibility issue between different Oracle Server versions. It is however not the TOracleDataSet that raises the error, it is the standard TField behavior.

I can only suggest that you modify the view so that the union explicitly returns a float. You can do this by adding a dummy calculation (e.g. field + 0 or field * 1).
 
Hi,

We got a similar problem with Oracle servers 10 and 9. On 10, our union-view containing an explicit cast to number(9) for a field, the field is returned as integer. On 9, it is returned as float.
The same dataset is used to hold results from other selects ( simple selects on one table ), depending on the user of the system. In this case, on both servers an integer field is returned.

How may we solve this problem? We don't have an idea besides the explicit cast, wich doesn't work.

Thanks in advance

Markus
 
Back
Top