Discussion Locked

VBScript Error - Overflow

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Any suggestions would be great!

I receive the following error:
THIS IS THE MESSAGE I GET!

Microsoft VBScript runtime error '800a0006'

Overflow

/ex/reporting/reports/writeBedding.asp, line 273

Here is line 273...
lastYearSealyPercent = CDbl(CDbl(lastYearSealyUnits) / CDbl(totalUnits) *
100.0)

3 replies

by peyison

First off - you don't really need all the CDbls(). I would say the first thing to check is the value of totalUnits - make sure it's not 0. While you're at it, check the value of lastYearSealyUnits as well. Make sure both variables contain valid numbers. You can use a call to reponse.write to output the values on the page. For example, after the tag you could include:

<% response.write "lastYearSealyUnits = " & lastYearSealyUnits & "; totalUnits = " & totalUnits %>

Hope this helps.

This discussion is closed to new replies.