Hi all,
I am facing very strange issue and the issue is that when I call procedure with specified parameters from C# .Net code then it gives incorrect data but when I execute procedure directly in SQL server with same parameter then it gives different result. The result returned directly on SQL server is correct. I investigated issue and found that if I set MultipleActiveResultSets to "False" in connection string then it gives correct result on calling procedure with same parameters from C#. And one more thing that it is not happening in every case i.e If I call procedure for different values of parameter then it works fine. It happening for one specific case i.e for specific value for parameter. I have tried entity framework, ADO.NET and Dapper for calling procedure from C# but same behaviour is noticed with all of them.
I am not sure what makes setting MultipleActiveResultSets to "False" results correct data.
Thanks in advance!
Priyank