what is overflow?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • middletree

    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(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)



  • Cowboy \(Gregory A. Beamer\)

    #2
    Re: what is overflow?

    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 " <middletree@hto mail.com> wrote in message
    news:O8ig0t2sDH A.3144@tk2msftn gp13.phx.gbl...[color=blue]
    > 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[/color]
    status[color=blue]
    > 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[/color]
    on[color=blue]
    > 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)
    >
    >
    >[/color]


    Comment

    • middletree

      #3
      Re: what is overflow?

      Never mind. Dividing by zero.


      "middletree " <middletree@hto mail.com> wrote in message
      news:O8ig0t2sDH A.3144@tk2msftn gp13.phx.gbl...[color=blue]
      > 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[/color]
      status[color=blue]
      > 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[/color]
      on[color=blue]
      > 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)
      >
      >
      >[/color]


      Comment

      Working...