With ADO.NET you need to set the Parameter Direction property to indicate
that this is a ReturnValue. The parameter name is irrelevant--you could call
it @Fred as long as the Direction is set to ReturnValue (based on the
intellisense choices).
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
[quoted text, click to view] "Smokey Grindel" <nospam@nospam.com> wrote in message
news:eCwodu2jIHA.1184@TK2MSFTNGP04.phx.gbl...
> Say I have a procedure that returns a return code like the following...
>
> CREATE PROCEDURE TestProc
> AS
> BEGIN
> SET NOCOUNT ON;
> SELECT *
> FROM MyTable;
> RETURN 10
> END
>
>
> And I execute that in a sql command object, how does my client application
> get the return code back? Which in this case is 10.. thanks!
>