P
peteZ
(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
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