i'm currently modifying a legacy application that uses the SqlHelper class in c#. how do you access the OUTPUT value using an executedatareader?
A:
You need to pass a SqlParameter
object with the correct name, then check the parameter's value after calling ExecuteDataReader
.
SLaks
2010-09-13 01:44:45
but wouldn't that defeat the parameter caching? i'm asking because that's what i'm doing right now.
Martin Ongtangco
2010-09-13 01:52:41
It does not make sense to cache output parameter as such. BTW, you have to indicate parameter's direction as output.
VinayC
2010-09-13 07:05:06