Hello,
I have tried to use UniDac with default settings and decimal values in order to view the limit over size of the decimal fields.
I have created on Firebird 2.5 this table:
CREATE TABLE TESTNUM
(
ID INTEGER NOT NULL,
NUM DECIMAL( 10, 2),
FLT DOUBLE PRECISION,
CONSTRAINT PK_TESTNUM PRIMARY KEY (ID)
);
Delphi XE6 + Unidac 5.39 create fields:
UniQuery1ID: TIntegerField;
UniQuery1NUM: TFloatField;
UniQuery1FLT: TFloatField;
When I edit on dbgrid or in TDBEdit the field NUM is automatically truncated of 2 decimal digits.
If I try to edit the field FLT it doesn’t limit the decimal digits.
Is it my impression but UniDac recognize the correct precision from DDL and automatically rounds the DECIMAL/NUMERIC fields?
If it is true, what is the round mode that you use?
If it is true, where can I find more information about this topic in the documentation?
If it is true, is it the same system with the other databases?
Thank you
Alessandro Savoiardo
DECIMAL/NUMERIC fields rounded into TFloatField
-
ecosoft.it
- Posts: 12
- Joined: Thu 01 Dec 2011 14:36
- Contact:
Re: DECIMAL/NUMERIC fields rounded into TFloatField
UniDAC reads out metadata from the server and uses it for setting accuracy of displaying DECIMAL fields. For value rounding, standard rules are used : 0,1 .. 0,5 are rounded to 0, and 0,6 .. 0,9 - to 1. Rounding rules are not a specificity of our products, therefore they are not described in our documentation.
The specified behavior is not specific to InterBase/Firebird, but common for all database servers.
The specified behavior is not specific to InterBase/Firebird, but common for all database servers.
-
ecosoft.it
- Posts: 12
- Joined: Thu 01 Dec 2011 14:36
- Contact:
Re: DECIMAL/NUMERIC fields rounded into TFloatField
Thank you,
everything is clearer now.
everything is clearer now.
Re: DECIMAL/NUMERIC fields rounded into TFloatField
Feel free to contact us if you have any further questions.