W
Wei Lu
Hi all,
Our web project may hang sometime. After checking the memory dump of the
process, we found that the process is hang on the class which try to get a
connection from the database.
The code sniper is like this:
public static System.Data.DataSet getDataSet(string sSQL,string
sConnection)
{
System.Data.DataSet _ds = new System.Data.DataSet();
AseDataAdapter _da = new AseDataAdapter(sSQL.Trim(), sConnection);
try
{
_da.Fill(_ds);
return _ds;
}
catch(AseException)
{
return null;
}
finally
{
_ds.Dispose();
_da.Dispose();
}
};
So my question is, how could I may sure that my connection is close so that
other thread will not hang for asking to the get the connection?
Wei Lu
Our web project may hang sometime. After checking the memory dump of the
process, we found that the process is hang on the class which try to get a
connection from the database.
The code sniper is like this:
public static System.Data.DataSet getDataSet(string sSQL,string
sConnection)
{
System.Data.DataSet _ds = new System.Data.DataSet();
AseDataAdapter _da = new AseDataAdapter(sSQL.Trim(), sConnection);
try
{
_da.Fill(_ds);
return _ds;
}
catch(AseException)
{
return null;
}
finally
{
_ds.Dispose();
_da.Dispose();
}
};
So my question is, how could I may sure that my connection is close so that
other thread will not hang for asking to the get the connection?
Wei Lu