BCD support in DOA

Ender

Member
I'm writing program that require knowledge about actual datatypes of fields in select statement. For example i have table:

create table Test1(DocNumber NUMBER(12));

When i do select from this table

select DocNumber from Test1;

... i receive field of type TFloatField. Obviously it should be TBCD or TFMTBCD but it is not. How to enable BCD support in DOA?
 
There is currently no BCD support in Direct Oracle Access. Number(12) fits nicely within the precision of a TFloatField though.
 
Number(12) is just example. I have numbers like this Number(22) or Number(18,6). Support for TFMTBCD will be great feature.
 
Originally posted by Ender:
Number(12) is just example. I have numbers like this Number(22) or Number(18,6). Support for TFMTBCD will be great feature.
Not just a feature but a must !!
Consider this example : I have a table with a field of type number(30).
I need to insert in this field a value like this one : 123456789123456789123456789.
Inserting this value using DOA or pl/sql developer this value will be transalted with Float precision and so in the database i have this value 123456789123457000000000000. Both values have the same floating point rapresentation (1,23456789123457E26) but are not equals. Inserting the same value using sql*plus the value is correctly inserted and displying both values using to_char reveal :

123456789123457000000000000 --> WITH DOA
123456789123456789123456789 --> WITH SQLPLUS

The same problem reading such values.
When i need to work with DOA i need to be sure the numeric fields are with a precision not exceding the Delphi Double one.

Regards

sergio sette
 
In this case you can set TOracleSession.Preferences.FloatPrecision:

property FloatPrecision: Integer;

Maximum precision to be represented a floating point field (Double). Setting this property to 0 will cause all non-integer numbers to be represented as a floating point field, even though a Double has a maximum precision of 15 digits. Setting it to a non-zero value will cause higher-precision numbers to be represented as a string field. The number will be converted to a string on the server, using the current NLS_LANG settings. This preference affects fields in TOracleQuery and TOracleDataSet components.
 
Originally posted by Marco Kalter:
In this case you can set TOracleSession.Preferences.FloatPrecision:
Hi Marco,

i'm aware of this options but that means i need to work with string instead of BCD.
I know the BCD support is in delphi not so complete (i.e.tandard operators like +, - ...cannot be used) but we have TFMDBcdField and IMHO DOA should support it.

Best regards

s7
 
Back
Top