I am executing a stored procedure from my C# .NET application. I am expecting an int value in a "out" parameter of that procedure.
However, sometimes I receive "null" value in that Stored Procedure.
I did confirm using SQL Profiler that the parameter values are passed correctly to the procedure and further the procedure is also getting executed successfully. The "out" variable is properly initialized and we are setting the record count value in that "out" parameter hence it can not be null.
But still on accessing the value of "out" parameter from the .NET app after the execution of the query, I receive null value.
FYI I am using ExecuteNonQuery Statement for executing the above stored procedure.
I am getting this issue once in every five-ten times call to that stored procedure.
This is evolving as a major issue with my application resulting into a blocker.
The issue is very urgent.
Any help would be appreciated.