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(Num erator,Denomina tor)
strResponse = (Numerator*100)/Denominator
intPos = inStr(cStr(strR esponse),".")
if intPos = 0 then
MakePercent = Cstr(strRespons e)&"%"
else
MakePercent = left(strRespons e,intPos-1)&"%"
end if
End Function
then, I add the function to the value itself:
MakePercent(arr StatusTime(6),s trTicketTotal) 2 13955
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********@hto mail.com> wrote in message
news:O8******** ******@tk2msftn gp13.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(Num erator,Denomina tor) strResponse = (Numerator*100)/Denominator intPos = inStr(cStr(strR esponse),".") if intPos = 0 then MakePercent = Cstr(strRespons e)&"%" else MakePercent = left(strRespons e,intPos-1)&"%" end if End Function
then, I add the function to the value itself:
MakePercent(arr StatusTime(6),s trTicketTotal)
Never mind. Dividing by zero.
"middletree " <mi********@hto mail.com> wrote in message
news:O8******** ******@tk2msftn gp13.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(Num erator,Denomina tor) strResponse = (Numerator*100)/Denominator intPos = inStr(cStr(strR esponse),".") if intPos = 0 then MakePercent = Cstr(strRespons e)&"%" else MakePercent = left(strRespons e,intPos-1)&"%" end if End Function
then, I add the function to the value itself:
MakePercent(arr StatusTime(6),s trTicketTotal) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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");
return(0);
}
}
|
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 miss something and width of paragraph can be set less than its content
(without overflow specification)?
Document is here:
http://terrainformatica.com/w3/p2/problem1.htm
|
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 implementations.
But then you have signed integers. Let's say a signed
integer is set to its maximum positive value. If you add 1
to it, what happens?:
A) It's implementation defined what value it will
|
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))
// overflow
else
// not overflow
|
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 (nested),
three list views, one tree control with up to 30,000 nodes, maybe 15
comboboxes (half of which have a large recordset as rowsource), 20 or
so buttons and around 30 text boxes (not to mention the images,
labels, etc and around 1000 lines...
| |
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 something;
|
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
integer scope smaller than MAXINT,so I want to seek a measure to test
the excess without the value's comparing to MAXINT. Please let me know
if you have a good idea.
THX.
|
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' cellpadding='0' cellspacing='0'
style='border-collapse:collapse; width:100%; height:100%;'>
<tr><td colspan='2' style='height:3em; border-bottom:1px solid
|
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 style="overflow:hidden;width: 355px;">Header1</div></td>
<td><div style="overflow:hidden;width: 100px;">Header2</div></td>
<td><div style="width: 100%;overflow:hidden;">Header3</div></td>
</tr>
|
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 type 'long' is used.
That way native C speed can be reached.
Now I want to experiment with raising a Seed7 exception
(which is emulated with setjmp(), longjmp() in C) for integer
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |