PC Review


Reply
Thread Tools Rate Thread

Arithmetic operation resulted in an overflow.

 
 
Diego F.
Guest
Posts: n/a
 
      23rd May 2007
Hello. I'm having an error in a database access. I'm just making a select
query to a table and using a DataAdapter to Fill a DataSet.

Sometimes it works and sometimes it results in an exception: Arithmetic
operation resulted in an overflow.

The query is the following:
select pausa, (sysdate-fecha)*24*60*60, comentario from
tableA where id = 44

Executing in the DB server (Oracle) it always works. But from the code, many
times it gives the exception above.

The code is quite simple:

Dim con As New OracleConnection(_cadConexion)
Dim da As New OracleDataAdapter(query, con)
Dim res As New DataSet

Try
con.Open()
da.Fill(res)
Catch ex As Exception

The exception is thrown in the da.Fill(res) line.

Any idea?

--

Regards,

Diego F.


 
Reply With Quote
 
 
 
 
jeff
Guest
Posts: n/a
 
      23rd May 2007
is fecha ever NULL ...

what data type is this column defined as in the dataset ... make sure the
number is not over its limit ... ie integer hold 32757 (or something like
that) ... make sure you results fits the field type.




"Diego F." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello. I'm having an error in a database access. I'm just making a select
> query to a table and using a DataAdapter to Fill a DataSet.
>
> Sometimes it works and sometimes it results in an exception: Arithmetic
> operation resulted in an overflow.
>
> The query is the following:
> select pausa, (sysdate-fecha)*24*60*60, comentario from
> tableA where id = 44
>
> Executing in the DB server (Oracle) it always works. But from the code,
> many times it gives the exception above.
>
> The code is quite simple:
>
> Dim con As New OracleConnection(_cadConexion)
> Dim da As New OracleDataAdapter(query, con)
> Dim res As New DataSet
>
> Try
> con.Open()
> da.Fill(res)
> Catch ex As Exception
>
> The exception is thrown in the da.Fill(res) line.
>
> Any idea?
>
> --
>
> Regards,
>
> Diego F.
>



 
Reply With Quote
 
 
 
 
Diego F.
Guest
Posts: n/a
 
      23rd May 2007
Yes, the problem is in that field. It is a date field. It returns an empty
result. What can be the problem? sysdate-sysdate returns 0, not an empty
result. Fecha has the actual date.

--

Regards,

Diego F.



"jeff" <jhersey at allnorth dottt com> wrote in message
news:OhzF%(E-Mail Removed)...
> is fecha ever NULL ...
>
> what data type is this column defined as in the dataset ... make sure the
> number is not over its limit ... ie integer hold 32757 (or something like
> that) ... make sure you results fits the field type.
>
>
>
>
> "Diego F." <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hello. I'm having an error in a database access. I'm just making a select
>> query to a table and using a DataAdapter to Fill a DataSet.
>>
>> Sometimes it works and sometimes it results in an exception: Arithmetic
>> operation resulted in an overflow.
>>
>> The query is the following:
>> select pausa, (sysdate-fecha)*24*60*60, comentario from
>> tableA where id = 44
>>
>> Executing in the DB server (Oracle) it always works. But from the code,
>> many times it gives the exception above.
>>
>> The code is quite simple:
>>
>> Dim con As New OracleConnection(_cadConexion)
>> Dim da As New OracleDataAdapter(query, con)
>> Dim res As New DataSet
>>
>> Try
>> con.Open()
>> da.Fill(res)
>> Catch ex As Exception
>>
>> The exception is thrown in the da.Fill(res) line.
>>
>> Any idea?
>>
>> --
>>
>> Regards,
>>
>> Diego F.
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GZipStream give error Arithmetic operation resulted in an overflow.(more then 3 GB file) harshad Microsoft Dot NET Framework Forms 1 29th Jan 2008 01:45 PM
question about 32-bit interger arithmetic vs. 32-bit float arithmetic zhihang.wang@gmail.com Computer Hardware 2 9th Jan 2006 03:21 AM
Re: System.OverflowException: Arithmetic operation resulted in an overflow. Maqsood Ahmed Microsoft C# .NET 0 15th May 2005 02:41 PM
Overflow or underflow in the arithmetic operation when showing form AGAIN? Dan Tanzer Microsoft Dot NET Framework 0 15th Feb 2004 08:51 PM
Re: Win98 only: underflow or overflow in arithmetic operation Jon Skeet Microsoft Dot NET Framework 0 27th Aug 2003 05:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:02 PM.