Our web application(dotnet framework 4.7) is running in IIS. Am using ODP.net
OracleManagedDataProvider
for oracle database.
We have dynamic report page which shows data from views. The problem is whenever we alter the view, we are experiencing the below issue
System.IndexOutOfRangeException: Index was outside the bounds of the array. at Oracle.ManagedDataAccess.Client.OracleDataReader.GetMinSchemaTable()
We can solve this issue by recycling the app pool
. I know that it is not perfect solution.
I think the schema information is being cached in ConnectionPool. Is there anyway we can clear it or please guide to me to solve this..
var dsResult = new DataSet();
var objCmd = new OracleCommand();
OracleConnection objConn = new OracleConnection(ConfigurationManager.ConnectionStrings["ConnString"].ConnectionString);
try
{
objConn.Open();
objCmd.Connection = objConn;
objCmd.CommandText = par_command;
OracleDataAdapter objDA = new OracleDataAdapter(objCmd);
objDA.Fill(dsResult);
}
catch
{
}
finally
{
objCmd.Dispose();
objConn.Close();
}