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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-11-01 : 08:37:39
|
| Chris writes "Hello and how are you doing?Anyway, I'm using SQL Server and Windows, both 2000.I have some code that works on one machine and not the other. To be specific, I have a function in .NET that calls a stored procedure (2 input and 15 output params). The webpage works fine on our closed network but not out on the open network. The previous version of the project I deployed worked, but the latest doesn't. This is weird because this portion of the code was not touched, in fact since I started on the project itself. The open network, what is happening is that SQL Server acts as if the output params are inputs because the error is saying that "Procedure or function DLP00_GetUser has too many arguments specified", which is a SqlException. So when I execute the stored procedure in SQL Query Analyzer, it returns "Procedure 'DLP00_GetUser' expects parameter '@outRole', which was not supplied." @outRole is the 1st output param and when you run the stored procedure thru .NET on the server explorer, the little table pops up that lists all of the params, labeling the direction of the inputs IN and the outputs IN/OUT, even though I have OUTPUT following the output variables. SQL and .NET are asking for values for the outputs.I don't know what the problem is, as far as why this is happening. SQL Server on both networks are identical, as far as my use of opening the connection and the permissions are the same as well. In fact, my web.config file has both definitions, and the only difference between them is the names of the data source.If you have an email, I would like to attach the code itself, which is all on a Word file and nicely laid out to avoid any confusion. Please le me know if I can do that.Thanx,Chris" |
|
|
Knarf180
Starting Member
42 Posts |
Posted - 2004-11-01 : 09:28:46
|
| The sad part is that this question hasn’t received any replies because its too long, no one wants to read that much =PTry checking out the compatibility level on both databases and make sure they match. You can find this setting by right clicking on the database in Enterprise Manager and going to properties. Then click on the Options tab. May not be the answer but its the first step towards trouble shooting. |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-11-01 : 12:17:37
|
| A stored proc doesn't have an output only parameter - only input or input/output.Unless the parameter has a default you must still send it a value in the call (null is ok for a value).You would have to specify the parameter in your client to receive the output value.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|
|
|