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.
| 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 ServerSQL Server: SQL 2000Additional: .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 HeonPixelMEDIA, Inc.Senior Application Programmer, MCPkheon@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 |
 |
|
|
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 HeonPixelMEDIA, Inc.Senior Application Programmer, MCPkheon@pixelmedia.com |
 |
|
|
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 |
 |
|
|
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 HeonPixelMEDIA, Inc.Senior Application Programmer, MCPkheon@pixelmedia.comEdited by - Kheon on 08/21/2002 14:46:02 |
 |
|
|
|
|
|
|
|