Stackoverflow Exception was unhandled
class BaseData
{
public string DbConnection = ConfigurationManager.ConnectionStrings["OLTPPOINTER_Connectionstring"].ConnectionString;
public string DbConnection_Report = ConfigurationManager.ConnectionStrings["OLTPPOINTER_Connectionstring"].ConnectionString;
protected SqlConnection OpenConnection()
{
SqlConnection conn = new SqlConnection(DbConnection);
try
{
if (conn.State != ConnectionState.Open)
{
conn.Open();
}
return conn;
}
catch { throw; }
}
I use recursive call,it works fine in sometime.
But in Sometime it throws an Exception in
SqlConnection conn = new SqlConnection(DbConnection);
or
adpt.Fill(ds, "DataSet");