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:
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);
}
}