I have managed to reproduce the issue with the following piece of code:
Code: Select all
private void button11_Click(object sender, EventArgs e)
{
OracleConnection oc = new OracleConnection();
oc.ConnectionString = "pooling = false";
oc.Unicode = true;
oc.Direct = false;
oc.Server = "development";
oc.UserId = "system";
oc.Password = "manager";
oc.Open();
OracleCommand o2 = new OracleCommand();
o2.ParameterCheck = true;
o2.Connection = oc;
o2.CommandType = CommandType.Text;
o2.CommandText = "SELECT dummy FROM dual";
o2.Prepare();
OracleCommand o3 = new OracleCommand();
o3.ParameterCheck = true;
o3.Connection = oc;
o3.CommandType = CommandType.Text;
o3.CommandText = "SELECT * FROM dual";
o3.Prepare();
o2.Dispose();
o2 = null;
//disconnect
oc.Close();
//reconnect
oc.Open();
//update query
o3.CommandText = "SELECT dummy FROM dual where rownum=1";
o3.Prepare();
}
I hope you can help.
Thanks
Darren