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

Required parameter not being passed

Status
Not open for further replies.

zooraw

Programmer
Jun 27, 2003
18
US
I've basically coded one huge mess of stored procedures, but that is beside the point.

Here is how it is set up.

MAIN_SP
SUB_SP_1
SUB_SP_A
SUB_SP_2
SUB_SP_3
SUB_SP_4
{List of SELECT statements for return to web interface}

A stored procedure that is indented is called by the one a level above it.

SUB_SP_1 and SUB_SP_2 both return OUTPUT to MAIN_SP. SUB_SP_A returns OUTPUT to SUB_SP_1. These all go together to help build 8 or so SELECT statements that I need at the end.

Anywho, I'm having a problem lately where, depending upon the values passed to SUB_SP_1, it tells me that I am not passing a required OUTPUT parameter to SUB_SP_1. It is pretty clear that I am passing a value to it...and I've even tried setting the @MyVariable immediately before the EXEC SUB_SP_1 @ParamList command.

The weird thing is that it doesn't halt execution when it says I am not passing the parameter. It continues all the way through the entire MAIN_SP and generates the entire result set and does the database update. It gives me an error on the website, though (saying that I am not passing a parameter to SUB_SP_1). But if I look in the database, every procedure in this crazy thing did it's part, and everything is right. It's just giving me this crazy "You didn't pass a required parameter" error that makes no sense.

Anyone ever seen anything like this?
 
Ok, apparently it didn't like my formatting.

MAIN_SP
--SUB_SP_1
----SUB_SP_A
--SUB_SP_2
--SUB_SP_3
--SUB_SP_4
{List of SELECT statements for return to web interface}
 
depending upon the values passed to SUB_SP_1, it tells me that I am not passing a required OUTPUT parameter to SUB_SP_1.

Can you run JUST SUB_SP_1? Provide it the parameter(s) it SHOULD be getting and see what the results are. Change the OUTPUT so the results are displayed. Are you really getting the results you expected to be returned to the other sp?

-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top