系统最近总是不定时的出现:Invalid attempt to Read when reader is closed 和 The connection is closed 这两个错误。下面是报错的代码。
public DataSet SelectDataBySQL(string sql)
{
OracleConnection conn = RedOralceDbPool.GetConnection();
OracleDataAdapter da = new OracleDataAdapter(sql, conn);
DataSet ds = new DataSet();
try
{
this.Open(conn);
da.Fill(ds);
}
catch (OracleException ex)
{
logger.Error(ex.Message);
}
finally
{
this.Close(conn);
}
return ds;
}
森林海
繁华开满天机