hello guys i have a database method for ExecuteNonQuery, can you please help me how to modified my method to prevent deadlock while executing some query in database?
public int DBexecuteNonQuery(string exec)
{
int retint = 0;
DBopen();
try
{
sqlcom = new SqlCommand(exec, this.sqlconn);
retint = sqlcom.ExecuteNonQuery();
}
catch (Exception e)
{
throw new ApplicationException(e.Message);
}
finally
{
DBclose();
}
return retint;
}
thanks and godblessauwi