Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SPROC works in QA but getting weird ASP errors...

Author  Topic 

KHeon
Posting Yak Master

135 Posts

Posted - 2002-08-21 : 14:17:08
Hello everyone!

I'm baffled and hope that someone can shed some light one what is happening here.

Platform: WIN2K Server
SQL Server: SQL 2000
Additional: .NET Beta 2 Installed (yeah, I know that needs to be updated)

I have a stored procedure which I pass a series of arguments to it to add a new user to my system. In the sproc I call a few other sprocs to do various things (like generating a random seed value and encrypting the password).

I get this error when I run this sproc from ASP (using a command object):

Formal parameter '@job_title' was defined as OUTPUT but the actual parameter not declared OUTPUT.

This seems to happen on ALL my arguments that have defaults assigned to them.

I tried to post the code but the forums weren't being all that nice, I'll try again by itself in another post.

Kyle Heon
PixelMEDIA, Inc.
Senior Application Programmer, MCP
kheon@pixelmedia.com

chadmat
The Chadinator

1974 Posts

Posted - 2002-08-21 : 14:22:22
You need to set the ParamType to Output on the Output parameter.


You can do it throught the parameters collection of the command object, or on the parameter itself if you explicitly add that parameter to the command object.

Post your code, it might be easier to explain

-Chad

Go to Top of Page

KHeon
Posting Yak Master

135 Posts

Posted - 2002-08-21 : 14:25:44
I tried to post the code but Snitz kept truncating it and just screwing it all up so here is a link to a text file where you can see my code.

[url]http://www.crypticmusings.com/sqlteam/needhelp.txt[/url]

Thanks for the help!

Kyle Heon
PixelMEDIA, Inc.
Senior Application Programmer, MCP
kheon@pixelmedia.com
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-08-21 : 14:43:56
Hmm...

Try dropping the SP and rebuilding it. Then make sure it runs fine in QA. If you still get the error after all of that checks out.
Try it on the released version of .Net, and see if you get the same results.

-Chad

Go to Top of Page

KHeon
Posting Yak Master

135 Posts

Posted - 2002-08-21 : 14:45:09
I was being a bonehead. I was mistaking the fact that you can reference the arguments by name and skip those with defaults thought I could do the same thing with the Command object, it appears not to be the case, and in fact the arguments have to be in the same order as they are defined in the procedure.

Thanks chad for your assistance.

EDIT: This works through QA without any issue.

Kyle Heon
PixelMEDIA, Inc.
Senior Application Programmer, MCP
kheon@pixelmedia.com

Edited by - Kheon on 08/21/2002 14:46:02
Go to Top of Page
   

- Advertisement -