Board index » delphi » Which domain is best for currency?

Which domain is best for currency?

Which domain and fieldtype of TIBDataset best for currency?
It seems to me, DOUBLE (now I'm using) not best.
 

Re:Which domain is best for currency?


"Slava Ekimov" <gazcen...@mail.ru> wrote

Quote
> Which domain and fieldtype of TIBDataset best for currency?
> It seems to me, DOUBLE (now I'm using) not best.

We use NUMERIC  lenght 15 scale 6 without problems.

Massimo

Re:Which domain is best for currency?


Why scale 6, not 2?
"Massimo Montrasio" <dbsoftinformat...@libero.it> ???Y/???Y ?????
???Y??: news:3a7946b9$1_2@dnews...
Quote
> "Slava Ekimov" <gazcen...@mail.ru> wrote
> > Which domain and fieldtype of TIBDataset best for currency?
> > It seems to me, DOUBLE (now I'm using) not best.

> We use NUMERIC  lenght 15 scale 6 without problems.

> Massimo

Re:Which domain is best for currency?


We have read in Interbase data definition guide that a domain NUMERIC(10, 2)
or greater is stored as int64 in dialect 3, so there is no difference for
phisical space in tables using a scale of  2 or greater.

Anyway we prefer NUMERIC  instead of DOUBLE because numeric holds number
with fixed decimal places more accurately.

Massimo.

Re:Which domain is best for currency?


We have read in Interbase data definition guide that a domain NUMERIC(10, 2)
or greater is stored as int64 in dialect 3, so there is no difference for
phisical space in tables using a scale of  2 or greater.

Anyway we prefer NUMERIC  instead of DOUBLE because numeric holds number
with fixed decimal places more accurately.

Massimo.

Other Threads