problems in Executing stored procedures in Asynchronous Request
Hello everybody,
I'm trying to launch a stored procedure from an asynchronous request but it doesn't wan't to start...
The Sqlserver process goes crazy when calling the SP but nothing is written into the datatables... (I don't know what's going on at that moment. No exception can be thrown as calling manually the procedures with the same arguments works without any problems)
This is the code i'm using to call the procedure:
using
{
oConn.Open();
using (SqlCommand oCmd =newSqlCommand())
{
oCmd.Connection = oConn;
oCmd.Parameters.Add(newSqlParameter("SqlQuery", SQLquery.SelectStatement));
oCmd.Parameters.Add(newSqlParameter("threadId", ThreadId.ToString()));
oCmd.Parameters.Add(newSqlParameter("jobId", jobId));
oCmd.CommandText ="dbo.Stats_Print_Data";
oCmd.CommandType =CommandType.StoredProcedure;
oCmd.BeginExecuteNonQuery();
}
}
Any body any idea? This is driving me nuts.
The stored procedure I'm calling is a CLR Stored procedure written in C#. I can run succesfully the procedure when performing a synchronous request using oCmd.ExecuteNonQuery(); However, this is not a solution as the procedures may take, for really big queries, more than 5 minutes to complete. In this case I receive a Request Time out before completion...
Any help or suggestion is welcome :-)
Thanks in advance

