开发者

Access 2003 and SQL Server Backend - Which datatype for currency?

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 SQ开发者_如何学CL Server?


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.)


You can use the money data type in SQL Server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜