what is overflow?

M

middletree

For my ASP app which tracks tech support tickets, I have a report which
breaks down how much time each ticket spent in a particular status (there
are 7 statuses, and I am not trying to find out how much time in the status
of Closed) For display purposes, it takes a time value, displays it, and
then displays the same value in percentage form. SO if we spent 100 hours on
a ticket, and 34 hours were in the status of Coding, then it would say: 3
days, 7 hours, 0 Minutes, and 34%. (each day is a 9-hour day)

For the first 25 records, it works fine. Then on the 26th one, I get this
error:

Microsoft VBScript runtime error '800a0006'

Overflow

/ticketlog/includes/functions.asp, line 59

---------------------
Here is my code. First, I have this function:

Private Function MakePercent(Numerator,Denominator)
strResponse = (Numerator*100)/Denominator
intPos = inStr(cStr(strResponse),".")
if intPos = 0 then
MakePercent = Cstr(strResponse)&"%"
else
MakePercent = left(strResponse,intPos-1)&"%"
end if
End Function

then, I add the function to the value itself:

MakePercent(arrStatusTime(6),strTicketTotal)
 
C

Cowboy \(Gregory A. Beamer\)

Overflow means you ended up with a number too large for the variable type.
The easiest way to determine is output the value prior to attempting to
calculate. You may just need to increase the size of the variable type (like
int to long).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top