I am running a stored procedure from C# Window Service. The stored proc is a quite heavy query and it takes quite a long time.
I want to wait till the stored proc finishes and return the values.
Is there any way to determine that stored proc is finished?
Use the
Threading.Tasks. following code will put your thread on wait till the task finish.