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
Migrating dbExpress project to ODAC without TFloatField
-
marilyn.works
- Posts: 4
- Joined: Wed 02 Nov 2011 08:47
Migrating dbExpress project to ODAC without TFloatField
Last edited by marilyn.works on Wed 09 Nov 2011 10:10, edited 1 time in total.
-
marilyn.works
- Posts: 4
- Joined: Wed 02 Nov 2011 08:47
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.
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.