(meant to post this SQL ADO message here instead of the C# Group)

Using C#, I can access results returned from a stored procedure call OK, my
question
is how do you access the value from a RETURN statement in a stored procedure
?

eg. In the Example below - how can I check on the Value -1000 (Customer
not found) ?

@CID = customer id . . . .


-- Does Customer Exist ?
IF NOT EXISTS (SELECT 1 FROM Customers (NOLOCK) WHERE CID = @CID)
RETURN -1000

- Customer Exists, pass back values
SELECT FirstName, LastName FROM Customers WHERE CID = @CID

RETURN 0


thanks,

- peteZ

cancel that - found it by peteZ

peteZ
Sun Aug 31 23:42:15 CDT 2003


"peteZ" <peteZ@aol.com> wrote in message
news:ODSHv4DcDHA.620@TK2MSFTNGP11.phx.gbl...
> (meant to post this SQL ADO message here instead of the C# Group)
>
> Using C#, I can access results returned from a stored procedure call OK,
my
> question
> is how do you access the value from a RETURN statement in a stored
procedure
> ?
>
> eg. In the Example below - how can I check on the Value -1000 (Customer
> not found) ?
>
> @CID = customer id . . . .
>
>
> -- Does Customer Exist ?
> IF NOT EXISTS (SELECT 1 FROM Customers (NOLOCK) WHERE CID = @CID)
> RETURN -1000
>
> - Customer Exists, pass back values
> SELECT FirstName, LastName FROM Customers WHERE CID = @CID
>
> RETURN 0
>
>
> thanks,
>
> - peteZ
>
>
>