I have a class that runs calculations on numbers and populates the results to my SQL database. My code behind page instantiates the class object, and in a loop it makes use of the method five times (once per loop). Essentially, my code behind collects the information from controls and passes the information to the class method for processing. The method works just fine most of the time.
On one of the iterations I get a error before the code even gets to the class. The error is, "Arithmetic operation resulted in an overflow." What strikes me as odd is that while stepping through the code, the loop crashes with that error before getting to the class that runs the calculations. Additionally, no arethmetic operations are performed on the form's code-behind page (which calls the method). I even put a break-point on the class constructor but the code crashed before reaching that constructor.
The information being sent is the results of matches from a sporting event. As a troubleshooting measure I changed the order of the matches by deleting them an re-entering them into the database in a different order. Again only this one particular match crashed.
Here is the code that crashes:
cRating.SetRating(dMatchDate, iSetID, 8, iHPlayerID,
View Complete Post