[AccessD] Currency vs Double

Rocky Smolin at Beach Access Software rockysmolin at bchacc.com
Mon Jan 14 07:49:47 CST 2008


Thanks all for the feedback on this.  

The client has gotten some advice that changing several fields from Double
to Currency will avoid some rounding problems that were encountered and
worked around in the current legacy app.   

I wrote a couple of functions myself years ago to round up and down.  Anyway
I suppose there's no harm in trying to mod the fields and see what happens.

Regards,

Rocky





 	
	

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Monday, January 14, 2008 2:10 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Currency vs Double

Hi Rocky

There is no way to choose a specific data type to solve each and every
rounding "issue". You have to know what you are doing and what you wish to
accomplish.

As the name Currency tells, it is optimized for money calculations where
indeed subtractions are performed without the typical errors from using
Double or Single. On the other hand, as JC shows, you may need to perform
interim calculations with another data type, or apply rounding carefully.
Sadly, the native Round function is buggy, so for critical applications you
will need a custom rounding function (one of which I have posted several
times).

/gustav

>>> rockysmolin at bchacc.com 13-01-2008 19:32:18 >>>
 
Dear List:
 
Is there any difference between currency and double when working with
relatively small number - like under a million?  Does currency take care of
rounding errors which would happen in double calculations?
 
MTIA
 
Rocky



--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.2/1223 - Release Date: 1/13/2008
8:23 PM
 




More information about the AccessD mailing list