Page 1 of 1
Migrating dbExpress project to ODAC without TFloatField
Posted: Wed 09 Nov 2011 08:10
by marilyn.works
I am migrating project that uses Oracle database, most of the fields in database are number, some functions return number. The problem is that when function returns number and is selected to application comes field with precision 32 and size 0, which is loosing decimals. The other problem is when fields are defined (15,2) it comes as TFloatField, but i dont want to change my old TFmtBcdField. My session setup to work with bcd, fmtbcd and integer.
regards
Posted: Wed 09 Nov 2011 09:04
by marilyn.works
The same problem with loosing precision is when in sql is used agregate function.
Posted: Thu 10 Nov 2011 08:41
by AlexP
Hello,
To change the field type from ftFloat to ftFMTBcd you need to reduce the value of the global FloatPrecision variable that is defined in the OraClasses module. For example, to make the Number(15,2) field ftFMTBcd, you need to set the value of the variable to 14 - FloatPrecision:= 14;
I cannot reproduce the problem with losing precision when using functions and aggregates, that's why send your sample including scripts for creating database objects to alexp*devart*com.