开发者

Store a 64 bits integer in a Jet engine (Access) database?

How would it be the best / most effective / less memory consuming way to store a 64 bits integ开发者_StackOverflower into a Jet Engine database? I'm pretty sure their integers are 32 bits.


The largest integer MSAccess supports is a NUMBER (FieldSize= LONG INTEGER) type but this is not 64 bits.

http://msdn.microsoft.com/en-us/library/ms714540(v=vs.85).aspx

To store numbers as large as 64 bits you will need to use the DOUBLE or DECIMAL type, but will not have "integer precision" with DOUBLE and you have overhead with DECIMAL

Alternatively you could use a CURRENCY type and disregard decimals. http://www.w3schools.com/sql/sql_datatypes.asp

For more details on the nuances of all data types you can look here: http://office.microsoft.com/en-us/access-help/introduction-to-data-types-and-field-properties-HA010233292.aspx

EDIT: Though you will have a limited number of significant digits in DOUBLE as pointed out by @ho1 in the comments below. You can make CURRENCY work by inferring the digits in code if you are pressed for disk storage space but your best bet is probably DECIMAL

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜