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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql 2000 stored procedure

Status
Not open for further replies.

dannabn

Programmer
Jun 12, 2003
5
US
I have serveral SP's that are called from a vb app, I want to only call one SP and when it's complete call the other
SP's, passing it the parm(s) they need. How can I do this ????

 
If all of the procedures are going to be called every time the first on is run (ie. you don't intend to run a procedure by itself) you can have each procedure call the next one when it's through. At the end of each procedure, just have something like the following code calling whatever procedure you want to run next:

exec ProcedureName
@var1 = @whatver,
@var2 = @whatever2

Warning: You want to be careful when doing this, you can easily have the procedures get caught in a loop. (first procedure calls the second procedure that calls the first procedure that calls the second procedure that calls the first procedure....)

Hope this helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top