[RESOLVED] Overflow error
Hi Guys,
I get an overflow error on this line of code:
Code:
tArrivalKms = CLng(.TextMatrix(j, 6))
The number I entered is 33333335555.
I have declared tArrivalKms as long. In my database I have an Integer field to store the value. What data type must I store this value as. Why am I getting an overflow? Please advise me
Re: [RESOLVED] Overflow error
With double the problem is the amount of significant numbers: if we compare Currency and Double in equal level in case of integer usage...
922337203685477.5807
179769313486232.0000
Currency can hold more significant numbers. If you try to store
1797693134862324
into Double you get
1797693134862320
which must be remembered when using floating point numbers. You don't get an error, but you may get results you don't expect.