I have an Access 2003 front-end that has data stored in a SQL Server backend database. I want to store monetary values (i.e. $1,3456.25) but I am not sure which datatype to use when going between SQL Server and Access. On the SQL Server side I figured Decimal (18,2) would be good to use as I only need a scale of two (two places to the right of the decimal). However, MS-Access does not have the decimal value type so I am unsure which data type to use in VBA when pulling data from the SQL Server. Should I be using a different datatype in SQL Server?
see my take on that http://stackoverflow.com/questions/582797/should-you-choose-the-money-or-decimalx-y-datatypes-in-sql-server/
SQLMenace
2010-08-25 18:09:53
If you used the "money" datatype in SQL Server what would the corresponding data type in Access/VBA be?
webworm
2010-08-25 18:24:08
SQL Server money data type will correspond to the Access Currency data type.
bobs
2010-08-25 18:41:23
I find @SQLMenace's cited article on SQL Server money type to be incredibly unenlightening -- lots of dogma and very little consideration of reality. I'm glad most SO users ignore the MS-ACCESS tag, since we generally avoid that kind of crap.
David-W-Fenton
2010-08-25 20:01:01
@David-W-Fenton, SQLMenace we just trying to demonstrate that the money datatype in SQL Server is not very reliable when calculations are used with it.
DForck42
2010-08-25 21:42:02
@David-W-Fenton I find SQLMenace to be unfailingly reliable in these topics.
Remou
2010-08-25 22:31:15
+1
A:
MS Access has a currency data type, you can use that. Access and SQL Server should be precise enough for you, but if you run in to problems, you can always use a scaled integer (multiply by 100 to store whole number of pennies.)
Beth
2010-08-25 18:23:45