Oracle connections are not closing even if i rewrite the code like below. I have 3 types Oracle Connections like DataReader,DataAdapter and Normal.
Which part do i make mistake ?
Type:1 - Datareader connections
using (OracleConnection con = new OracleConnection(oradb))
{
con.Open();
using (OracleCommand cmd1 = new OracleCommand("select sql_fulltext \"SQL Text\" from gv$sqlarea where rownum<2 and sql_id='" + sqlid + "'", con))
{
OracleDataReader dr1 = cmd1.ExecuteReader();
dr1.Read();
rtbSQLDetails.Text = dr1.GetString(0);
}
}
Type:2 Data Adapter Connections
using (odagetInstID = new OracleDataAdapter("select distinct INST_ID from gv$instance where status='OPEN'", oradb))
{
odagetInstID.Fill(dtInstID);
}
Type:3 Normal Connections
using (var con = new OracleConnection(oradb))
{
con.Open();
//...
}