473,386 Members | 2,042 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

what is overflow?

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
2 13931
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Victor Hannak | last post by:
I have a class with the following public function: float FuncClass::GetResult() { try { return(Result); } catch (...) { WriteString("FuncClass::GetResult ERROR: Exception encountered");...
15
by: Andrew Fedoniouk | last post by:
I have a simple test document which produce the following in Mozilla and Opera: http://terrainformatica.com/w3/p2/problem1.png Internet Explorer behaves as per recommendation (I guess) Did I...
44
by: JKop | last post by:
You know how the saying goes that *unsigned* overflow is... well.. defined. That means that if you add 1 to its maximum value, then you know exactly what value it will have afterward on all...
4
by: aling | last post by:
Given: signed a, b; How to judge overflow of the sum of these two operands? Just use one *if* statement. Is this statement right? if ((a>0 && b>0 && sum<=0) || (a<0 && b<0 && sum>=0)) //...
19
by: Jim | last post by:
I have spent the past few weeks designing a database for my company. The problem is I have started running into what I believe are stack overflow problems. There are two tab controls on the form...
25
by: junky_fellow | last post by:
Is there any way by which the overflow during addition of two integers may be detected ? eg. suppose we have three unsigned integers, a ,b, c. we are doing a check like if ((a +b) > c) do...
8
by: starffly | last post by:
In my program, the caculated value is supposed to be no more than the constant named MAXINT,otherwise, overflow error will be informed.however, I cannot test if the value exceeds MAXINT within the...
4
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0'...
2
by: lexor | last post by:
Hi! I'm struggling with a strange IE behavior regarding tables. I have a table like the following one <table cellpadding="0" cellspacing="0" border="1" width="500"> <tr> <td><div...
42
by: thomas.mertes | last post by:
Is it possible to use some C or compiler extension to catch integer overflow? The situation is as follows: I use C as target language for compiled Seed7 programs. For integer computions the C...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.