Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The dreaded -too many arguments- error.
Message
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
The dreaded -too many arguments- error.
Miscellaneous
Thread ID:
00280323
Message ID:
00280323
Views:
46
I'm trying to execute my stored procedure, but I get the "too many arguments for the procedure sp_addschool" error -- even though the count seems fine to me. What the heck is going on?

MY PROCEDURE

Create Procedure sp_addschool
@u_school varchar(30),
@u_pass varchar(30),
@u_fname varchar(30),
@u_lname varchar(30),
@u_state varchar(30),
@u_id int output
As
set nocount on
if not exists(select u_id from t_user where u_school=@u_school)
begin
.. blah (does this matter for this error?)
end
else
select @u_id=-1
return ;
MY CODE:
Dim oCmd
Set oCmd = Server.createobject("ADODB.Command")
Set oCmd.ActiveConnection = oConn
oCmd.CommandText = "sp_addschool"
Cmd.CommandType = adCmdStoredProc
oCmd.Parameters.append oCmd.CreateParameter("u_school", adVarChar,
                                           adParamInput,30,sSName)
OCmd.Parameters.append oCmd.CreateParameter("u_pass", adVarChar,
                                           adParamInput,30,sPass)
oCmd.Parameters.append oCmd.CreateParameter("u_fname", adVarChar,
                                           adParamInput,30,sFName)
oCmd.Parameters.append oCmd.CreateParameter("u_lname", adVarChar,
                                           adParamInput,30,sLName)
oCmd.Parameters.append oCmd.CreateParameter("u_state", adVarChar,
                                           adParamInput,30,sState)
set oReturn = oCmd.CreateParameter("u_id", adInteger, adParamOutput)
oCmd.Parameters.append oReturn
oCmd.execute()
Reply
Map
View

Click here to load this message in the networking platform