what is overflow?

Discussion in 'ASP General' started by middletree, Nov 25, 2003.

  1. middletree

    middletree Guest

    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)
    middletree, Nov 25, 2003
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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)
    >
    >
    >
    Cowboy \(Gregory A. Beamer\), Nov 25, 2003
    #2
    1. Advertising

  3. middletree

    middletree Guest

    Never mind. Dividing by zero.


    "middletree" <> wrote in message
    news:...
    > 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)
    >
    >
    >
    middletree, Nov 25, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Isaac
    Replies:
    2
    Views:
    3,843
    Arvind Kumar
    Aug 18, 2003
  2. Zaki
    Replies:
    2
    Views:
    6,570
    Egbert Molenkamp
    Jun 30, 2004
  3. Rune Christensen
    Replies:
    4
    Views:
    9,887
    David R Brooks
    Jan 22, 2005
  4. Nemesis

    Signed Adder without overflow

    Nemesis, May 24, 2005, in forum: VHDL
    Replies:
    4
    Views:
    7,527
    Nemesis
    May 25, 2005
  5. Lilmiss

    Overflow detector

    Lilmiss, Aug 2, 2005, in forum: VHDL
    Replies:
    1
    Views:
    2,444
    Ralf Hildebrandt
    Aug 2, 2005
Loading...

Share This Page