OCI-22053: Overflow Error

Forum destinado a Linguagem JAVA! Classes, orientação a objeto, conexão com banco, chamada de procedures, etc
Post Reply
joaoluizbt
Rank: Programador Pleno
Rank: Programador Pleno
Posts: 37
Joined: Thu, 05 May 2011 3:53 pm
Location: Rio de Janeiro

Good afternoon,

I have a class that searches for the information of a table, but when this search is made, it gives Stack Overflow error ... but the table only has a line, should not Give this mistake, right?

follows the code:

Class code:

Select all

public DataSet RetornaDataSet(string strQuery) 
            { 
            OracleConnection cn = new OracleConnection(); 
            try  
            	{	     
                cn = Abriconexao(); 
                OracleCommand cmd = new OracleCommand(); 
                cmd.CommandText = strQuery.ToString(); 
                cmd.CommandType = CommandType.Text; 
		        cmd.Connection = cn; 
                cmd.ExecuteNonQuery(); 
                /*  Declarado um dataadapter e um dataset 
                    passar o comando para o da (SqlDataAdapter) e  
                    carregar o dataset com resultado da busca */ 
                OracleDataAdapter da = new OracleDataAdapter(); 
                DataSet ds = new DataSet(); 
                da.SelectCommand =  cmd; 
 
                da.Fill(ds); // O ERRO DÁ AQUI, NO PREENCHIMENTO. 
 
                return ds; 
            	} 
            
            finally 
            { 
                FecharConexao(cn); 
            } 
 
            }
Thanks.
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

Joao,

I do not know if this forum would be the most suitable for your question.
But if you search for Google by OCI-22053, you will find multiple reports with this type of problem, involving the Oracle database.
As I could understand these articles, a problem may be occurring in the conversion of numeric fields with decimal places (eg Number (15.4)), which would be generating this overflow error.
Your table of a line seizures Number (N, D) fields?
In this case, which most articles recommended was to resort these fields in the execution of the SELECT command.

Specifically it was recommended that

Select all

TRUNC([nome_do_campo],2)

Select all

TRUNC([nome_do_campo],2)
in Select to "round" these fields with many decimal places.

Ex:

Select all

TABELA_A (VALOR NUMBER(14,5)) 
SELECT TRUNC(VALOR,2) FROM TABELA_A;

I hope this information helps you in solving the problem.

Hugs,

Sergio
User avatar
dr_gori
Moderador
Moderador
Posts: 5024
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

Topic moved to Java ...
victorhugomuniz
Moderador
Moderador
Posts: 1396
Joined: Fri, 01 Feb 2008 2:06 pm
Location: Rio de Janeiro - RJ
Contact:
:D

Possibly the error does not give in this line .. I understand that your IDE is pointing at her but stackoverflow is a masked mistake .. Your real error is likely to be

What does this line do?

Select all

da.SelectCommand =  cmd; 

I think you are mixing a few things there .. are you really using Java?
joaoluizbt
Rank: Programador Pleno
Rank: Programador Pleno
Posts: 37
Joined: Thu, 05 May 2011 3:53 pm
Location: Rio de Janeiro

Ola,

The problem was the houses after the virgulum.
After I gave a trunced it worked ..

Thank you very much.
Renato Menezes Viana
Rank: Analista Pleno
Rank: Analista Pleno
Posts: 128
Joined: Sat, 18 Nov 2006 11:51 am
Location: Rio de Janeiro - RJ

Personally, getting into the subject, the link below demonstrates how to pick up the error description (SQLERRM) in Java.
http://docstore.mik.ua/orelly/oracle/gu ... h09_08.htm
It seems that existing in the Java code the line below, always a very enlightening error message will appear.

Select all

} catch (SQLException e) {System.err.println(e.getMessage());}
I kicked or right?
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest