![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Wed, Jan 14 2009 6:34 PM | Permanent Link |
Phil Read | Hi all,
Moved to ElevateDB and all the tables I migrated from DBISAM that used Currency have defaulted to Float. Not to be honest I I moved to BCD size 2 for storing monetary values in DBISAM as it was more precise than the Currency with rounding errors etc So taking that into consideration, what should I be using in ElevateDB to store monetary values? Should I be using a Decimal with a scale of 2 or something else? Thanks, Phil. |
Thu, Jan 15 2009 10:31 AM | Permanent Link |
Fernando Dias ![]() | Phil,
<< Moved to ElevateDB and all the tables I migrated from DBISAM that used Currency have defaulted to Float. >> In DBISAM, "Currency" fields are the same as "Float" fields (except for the display format) and the equivalent of the "Double" Delphi variables and ftCurrency TFieldType, so the migration process behaved as expected transforming "Currency" fields into FLOAT columns. The equivalent SQL type was MONEY, that is no longer supported in EDB. On the other hand, BCD fields (DBISAM) are equivalent to the "Currency" Delphi variables and to ftBCD TFieldType and, when migrated to EDB, are equivalent to the DECIMAL SQL type. << So taking that into consideration, what should I be using in ElevateDB to store monetary values? Should I be using a Decimal with a scale of 2 or something else?>> If you want an exact representation and you don't need more than 4 decimal places, yes, you should be using DECIMAL column types ( and the equivalent "Currency" Delphi variables). -- Fernando Dias [Team Elevate] |
Sun, Jan 18 2009 1:35 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Phil,
<< So taking that into consideration, what should I be using in ElevateDB to store monetary values? Should I be using a Decimal with a scale of 2 or something else? >> Yes, DECIMAL with a scale of 2. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |