Hi,
I am using C# Application to make the connection with MS-Acces and closing each connection after executing insert and select statements.
But after executing 600-700 times, it is throwing an Execption:
"System resource exceeded"
There are no CPU utilization and memory utilization that time.
Also after restarting the application, it works normaly.
Below is the code snippet I am using:
try
{
this.strMdbFile = paramstrMdbFile;
this.strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=;Data Source=" + paramstrMdbFile + ";";
conDBData = new OleDbConnection(strConnString);
conDBData.Open();
conDBData.Close();
}
catch (Exception ex)
{
string strError = ex.Message;
MessageBox.Show(strError);
}
finally
{
if (conDBData != null)
{
if (conDBData.State == ConnectionState.Open)
{
conDBData.Close();
}
}
}
Kindly suggest.