System.OverflowException!!!

This is the first time in my life I’ve actually run into an OverflowException when converting a string value to C#’s Int32. It’s time to upgrade and beef up the application to handle Int64 in certain scenarios. Time to play with the big boys.

The max value for an Int32 is 2,147,483,647.
The max value for an Int64 is 9,223,372,036,854,775,807.

Here’s my Event Log:

Event Type: Error
Event Source: Secure Vantage Audit Collection Admin
Event Category: None
Event ID: 0
Date: 7/3/2008
Time: 1:39:23 PM
User: N/A
Computer: CLEAN-OPSMGR
Description:
Could not update AuditCollectionAdminServices.

System.OverflowException: Value was either too large or too small for an Int32.
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ToInt32(Object value)
at SecureVantage.OpsMgr.Consoles.Services.AuditCollectionAdmin.DataAccess. AdtAdminData.GetStats() in C:\apps\opsmgr-consoles_BUILD_0.2_Beta\src\Services.AuditCollectionAdmin\DataAccess\AdtAdminData.cs:line 66

So what the hell is Audit Collection Admin Services? It’s a BETA product I’m currently fine tuning for SecureVantage. WHOOOHOOO!

One thought on “System.OverflowException!!!

  1. When I am trying to write code convert.ToInt32(TxtMob.Text) i am getting Value was either too large or too small for an Int32. my oracle database number(11,0) also i tried for Int32.Parse() method also
    when use the same with label control it work fine.

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve this: Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.