423,688 Members | 2,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,688 IT Pros & Developers. It's quick & easy.

what is overflow?

P: n/a
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)

Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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!
************************************************** ********************
"middletree" <mi********@htomail.com> wrote in message
news:O8**************@tk2msftngp13.phx.gbl...
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)

Jul 19 '05 #2

P: n/a
Never mind. Dividing by zero.
"middletree" <mi********@htomail.com> wrote in message
news:O8**************@tk2msftngp13.phx.gbl...
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)

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.