OCI-22053: overflow error - C#

Asked

Viewed 2,060 times

0

I am developing a web application in MVC with C#. I made a method that makes a select in my bank and with the value returned I fill a DataTable. But it returns an error the moment I run "dataAdapter.Fill(resultado)" returning the error:

OCI-22053: overflow error.

Can anyone tell me the reason for this mistake?

Follows code of method:

public DataTable ResgataArquivos()
{
    var resultado = new DataTable();

    myConnection.ConectarBanco(modelLogin);

    var query = "SELECT * FROM ARQUIVO";

    var command = new OracleCommand(query, myConnection.connection);
    var dataAdapter = new OracleDataAdapter(command); 
    dataAdapter.Fill(resultado);

    myConnection.FecharConexaoBanco();

    return resultado;
}
  • Matheus, did you ever do a test limiting the amount of results? (WHERE ROWNUM <= qtd_lines);

  • No. But this table of mine only has 1 record.

1 answer

2


I researched here about this error and in most cases the problem was because of some column that was NUMBER(N,D) an error in converting these values may happen to be other fields also that exceeded the limit at the time of conversion so take a look at your entered data.

Try giving a TRUNC if you have any such column.

"SELECT TRUNC(VALOR,2) FROM Arquivo"



People with the same problem: 1, 2 and 3.

  • That’s right Maicon! I had a field that had many decimal places, and it wasn’t meant to be. I fixed the field and it worked. Thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.