Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Return value from Stored Procedures

Status
Not open for further replies.

HouDog

Programmer
Aug 14, 2003
54
CA
Hi All, my question has 2 parts.

When a Stored Procedure has the line
RETURN 0
how do I access the 0 return value when called from

a) another stored procedure
b) ADO.NET using the ExecuteNonQuery method

Any help would be greatly appreciated.
 
Answer for your first part:

DECLARE @ReturnValue int
EXECUTE @ReturnValue = your_stored_procedure param1, param2, ...


Zhavic

---------------------------------------------------------------
In the 1960s you needed the power of two Comodore64s to get a rocket to the moon. Now you need a machine which is a vast number of times more powerful just to run the most popular GUI.
 
Thank-you Zhavic. I tried it and it works great. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top