Hi,
Use ExecuteScalar instead.
http://msdn.microsoft.com/library/de...calartopic.asp
Ken
-------------------------
"RJN" <rj*@yahoo.com> wrote in message
news:u8**************@TK2MSFTNGP10.phx.gbl...
Hi
I want to get the rerurn value from a stored procedure
My stored proc looks like this
create proc test
.....
if..
return 1
else
if ..
return 2
else
..return 0
I'm using the SqlHelper.ExecuteNonQuery and pass the procedure name,
connection and an array of parameters. How I do I get the return value
from this. If I create a parameter of Diretion ReturnValue and include
in the parameter array, I get an error that the parameters don't match.
WHat is the correct way of doing?
Regards
RJN
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!