"System.OverFlowException" when I try to create a new datatable.

supreme_good

Member
Joined
Sep 19, 2006
Messages
12
Programming Experience
Beginner
Hello all. Thank you all in advance for any and all help with this issue. I have an application where there is a sub that creates a new datatable object. This line of code will randomly generate the following error;

**********************************************************

System.OverflowException: Arithmetic operation resulted in an overflow.

**********************************************************

I have absolutely no idea what or why this is occurring. This program simply queries a remote table and uploads the end result into a local Oracle DB. It is run using the windows task scheduler and has been in place for several months now without any issues. Over the last 48 to 72 hours this problem has gone from a once in a while annoyance to a full blown issue that prevents the app from completing it's instructions in full.

Here is the actual code causing the issue.

**********************************************************
VB.NET:
    Sub DoArtemis()
        Try
            [COLOR="Red"][B]Dim oDataTable As New DataTable[/B][/COLOR] [B]--> THIS IS THE LINE CAUSING THE ERROR[/B]
            Dim oProcess As New Process

            Console.WriteLine("GETTING ARTEMIS DATA...")
            Console.WriteLine("")
            oDataTable = MyFunctions.GetODBCSQLServerData_TwoDay(0)

            MyFunctions.FlushMemory()
            ...
**********************************************************

It would be very appreciated if someone could give me a clue why trying to create a datatable object is throwing me such a fit.

Thanks for your time,
supreme_good :D
 
Hello all. I am still trying to figure out this error. I have trapped the error and am surprised to see that there is not much info available at all from it. I trapped the stacktrace and it was extremely short...

******************************************************************
System.OverflowException: Arithmetic operation resulted in an overflow.
at NRTLoads.MySubRoutines.DoArtemis() in V:\_Data\DataApps\NRT\NRTLoads\NRTLoads\NRTLoads\MySubRoutines.vb:line 238

******************************************************************

The info found above tells me what I already knew...the line of code that dims a new data table is causing this error. I still have no idea why. It doesn't happen every time it runs but it happens very frequently. I really need a new set of eyes to give me a clue as to what to do about this one.

Thanks!
 
Back
Top