Arithmetic operation resulted in an overflow.

D

Diego F.

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?
 
J

jeff

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.
 
D

Diego F.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top