Problem with TOracleDataSet and FieldTypes

benh

Member
I have a TOracleDataSet with SQL that pulls a NUMBER(6) field. Normally, I would create a fielddef of type TIntegerField. However, if my SQL contains a UNION, it generates an error that it is expecting a TFloatField.
If I then change it to a TFloatField, even though it is still a NUMBER(6) it will work.
This seems inconsistant. Should it matter if my SQL contains a UNION or not ?
 
Whenever you use any kind of arithmetic or set function, the scale and precision of the base column is "lost". Oracle will simply report a number without scale and precision, so that it comes out as a TFloatField.

------------------
Marco Kalter
Allround Automations
 
We wrote an descendant class of TOracleDataSet having a collection which manually maps the datatypes. It's more manual work to define the mapping, but it does what we expect. Btw. you could have boolean fields out of number fields. I could send you the code. The bad thing is that you will need some minor changes in TOracleDataSet directly.

Hey Marco, what about having similar thing in DOA4.00?
 
We also have same problem.
We tried to use the non-union SQL to define the TField and change it to union SQL at runtime but still failed.
Is there any workaround without changing TOracleDataSet ?

Regards,
Nelson.
 
Back
Top