View Full Version : Overflow

03-09-2006, 07:25 AM
hi.. i have the followin codes:

<% dim counterVar
counterVar = 1%>

<% For a=0 to UBound(Action,2) %>
<% For each x in CountArray %>
((No.of actions found/total no. of alerts) * 100)
<% num = FormatNumber((( x / (rs_total("numVar"))) * 100),2)%>
<param name="val<%=counterVar%>" value="<%=(num)%>">
<% counterVar = counterVar + 1 %>
<% Next %>
<% Next %>

It will generate a piechart.. and this part is to part to get a value..
Sometimes it will get the values.. but sometimes it will have an error 'Overflow'
Any1 knows what happen?


03-09-2006, 02:31 PM
It can happen if the number is too large for an integer. Try converting your numbers to CLng

03-10-2006, 04:29 AM
o.. but this will only happens if i do not have a value...

03-10-2006, 02:30 PM
Then put in a condition only to perform the formula when there is a vaild value.