ARGH!! STORED PROCEDURE = TOO many arguments.

Results 1 to 3 of 3

Thread: ARGH!! STORED PROCEDURE = TOO many arguments.

  1. #1
    Louie the 7th Guest

    Default ARGH!! STORED PROCEDURE = TOO many arguments.

    I&#039m trying to execute my stored procedure, but I<BR>get the "too many arguments" error -- even though<BR>the count seems fine to me. What the heck is<BR>going on?<BR><BR>MY PRCOEDURE: <BR>Create Procedure sp_addschool<BR> @u_school varchar(30),<BR> @u_pass varchar(30),<BR> @u_fname varchar(30),<BR> @u_lname varchar(30),<BR> @u_state varchar(30),<BR> @u_id int output<BR>As<BR> set nocount on<BR> if not exists(select u_id from t_user where <BR> u_school=@u_school)<BR> begin<BR> .. blah (does this matter for this error?)<BR> end<BR> else<BR> select @u_id=-1<BR> return ;<BR><BR>-------------------------------------------------<BR>MY CODE:<BR><BR>Dim oCmd<BR>Set oCmd = Server.createobject("ADODB.Command")<BR>Set oCmd.ActiveConnection = oConn<BR>oCmd.CommandText = sp_addschool<BR>oCmd.CommandType = adCmdStoredProc<BR>oCmd.Parameters.append oCmd.CreateParameter("u_school", adVarChar, adParamInput,30,sSName)<BR>oCmd.Parameters.append oCmd.CreateParameter("u_pass", adVarChar, adParamInput,30,sPass)<BR>oCmd.Parameters.append oCmd.CreateParameter("u_fname", adVarChar, adParamInput,30,sFName)<BR>oCmd.Parameters.append oCmd.CreateParameter("u_lname", adVarChar, adParamInput,30,sLName)<BR>oCmd.Parameters.append oCmd.CreateParameter("u_state", adVarChar, adParamInput,30,sState)<BR>set oReturn = oCmd.CreateParameter("u_id", adInteger, adParamOutput)<BR>oCmd.Parameters.append oReturn<BR>oCmd.execute()<BR>

  2. #2
    Pure Krome Guest

    Default RE: ARGH!! STORED PROCEDURE = TOO many arguments.

    oCmd.CommandText = sp_addschool<BR><BR>change it to<BR><BR>oCmd.CommandText = "sp_addschool"<BR><BR>it was trying to do some other SP i think?<BR><BR>give that a go snappa.<BR><BR>-PK-

  3. #3
    Pure Krome Guest

    Default RE: ARGH!! STORED PROCEDURE = TOO many arguments.

    a further note on this is to get in the habbit of doing<BR>&#060;% OPTION EXPLICIT %&#062;<BR>on the top of all your pages - asp AND vb dll componenets (if your upto doing those)<BR><BR>-PK-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts