Search code examples
c#sqlhelper

how to access an Output parameter in the old SQLHelper.cs class?


i'm currently modifying a legacy application that uses the SqlHelper class in c#. how do you access the OUTPUT value using an executedatareader?


Solution

  • You need to pass a SqlParameter object with the correct name, then check the parameter's value after calling ExecuteDataReader.