HI,
I have a sql stored procedure, which i am calling from my asp.net (2.0) code by using sqlCom.ExecuteNonQuery(), but it tooks around 60 to 100 second to complete, and while i execute the same SP from sql query tool runs in 3 to 4 seconds.
Please help on this.
Edit - code from comments:
public int ExecuteNonQuery(string strSpName, DbParameter[] parameterValues)
{
CreateConnection();
SqlCommand sqlCom = new SqlCommand();
if (strSpName == null || strSpName.Length == 0)
throw new ArgumentNullException("strSpName");
int i = 0;
sqlCom.Connection = _sqlConn;
if (_blnIsTransEnabld == true)
sqlCom.Transaction = _sqlT;
sqlCom.CommandType = System.Data.CommandType.StoredProcedure;
sqlCom.CommandText = strSpName;
sqlCom.CommandTimeout = _sqlConn.ConnectionTimeout;
return sqlCom.ExecuteNonQuery();
}