tags:

views:

20

answers:

1

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
but wouldn't that defeat the parameter caching? i'm asking because that's what i'm doing right now.
Martin Ongtangco
It does not make sense to cache output parameter as such. BTW, you have to indicate parameter's direction as output.
VinayC