Sunday 28 September 2014

Currency field type in VFP9

VFP9 stores currency data as Int64 (8 bytes). The original value is multiplied by 10,000, then rounded to 0 decimal places, and then stored in a table. For example, 12.4301 is stored as 124301.

Currency field type has 4 fixed decimal places.

Normally this knowledge is irrelevant because the VFP converts numbers to currency and backwards implicitly. Only if you need to access tables on a lower level, you need to know this.

No comments:

Post a Comment