Too Many Arguments Specified Error

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

Hi,

I am getting this error when I attempt to execute an Update
stored procedure. My stored procedure declaration is shown below:

ALTER PROCEDURE [dbo].[usp_Update_Estimate](
@ESTIMATE_ID integer,
@PLANVIEW_ID integer,
@TITLE varchar(50),
@APPLICATION_ID integer,
@DESCRIPTION varchar(2000),
@INTERNAL_COMMENTS varchar(2000),
@ANALYSIS_HOURS int,
@DEVELOPMENT_HOURS int,
@IST_HOURS int,
@ET_HOURS int,
@SECURITY_BCP_HOURS int,
@MEETING_HOURS int,
@POST_INSTALL_HOURS int,
@TOTAL_HOURS_IN_ESTIMATE int,
@ESTIMATE_DT datetime,
@ESTIMATED_BY int,
@MGR_APPROVAL bit,
@MGR_APPROVAL_DT datetime,
@BUS_ACCEPT bit,
@BUS_ACCEPT_DT datetime,
@REQ_RECEIVED_DT datetime,
@TOG_PROJ_MGR_ID int,
@LOB_PROJ_MGR_ID int)
AS
BEGIN
blah blah blah
END

The Update parameters from my ASP.NET page are shown below

<UpdateParameters>
<asp:Parameter Name="ESTIMATE_ID" Type="Int32"
Direction="Input" />
<asp:Parameter Name="PLANVIEW_ID" Type="Int32"
Direction="Input" />
<asp:Parameter Name="TITLE" Type="String"
Direction="Input" />
<asp:Parameter Name="APPLICATION_ID" Type="Int32"
Direction="Input" />
<asp:Parameter Name="DESCRIPTION" Type="String"
Direction="Input" />
<asp:Parameter Name="INTERNAL_COMMENTS" Type="String"
Direction="Input" />
<asp:Parameter Name="ANALYSIS_HOURS" Type="Int32"
Direction="Input" />
<asp:Parameter Name="DEVELOPMENT_HOURS" Type="Int32"
Direction="Input" />
<asp:Parameter Name="IST_HOURS" Type="Int32"
Direction="Input" />
<asp:Parameter Name="ET_HOURS" Type="Int32"
Direction="Input" />
<asp:Parameter Name="SECURITY_BCP_HOURS" Type="Int32"
Direction="Input" />
<asp:Parameter Name="MEETING_HOURS" Type="Int32"
Direction="Input" />
<asp:Parameter Name="POST_INSTALL_HOURS" Type="Int32"
Direction="Input" />
<asp:Parameter Name="TOTAL_HOURS_IN_ESTIMATE" Type="Int32"
Direction="Input" />
<asp:Parameter Name="ESTIMATE_DT" Type="DateTime"
Direction="Input" />
<asp:Parameter Name="ESTIMATED_BY" Type="Int32"
Direction="Input" />
<asp:Parameter Name="MGR_APPROVAL" Type="Boolean"
Direction="Input" />
<asp:Parameter Name="MGR_APPROVAL_DT" Type="DateTime"
Direction="Input" />
<asp:Parameter Name="BUS_ACCEPT" Type="Boolean"
Direction="Input" />
<asp:Parameter Name="BUS_ACCEPT_DT" Type="DateTime"
Direction="Input" />
<asp:Parameter Name="REQ_RECEIVED_DT" Type="DateTime"
Direction="Input" />
<asp:Parameter Name="TOG_PROJ_MGR_ID" Type="Int32"
Direction="Input" />
<asp:Parameter Name="LOB_PROJ_MGR_ID" Type="Int32"
Direction="Input" />
</UpdateParameters>

It appears that everything matches up, yet I still get the Too Many
Arguments Specified error. Can anyone tell me what I am doing wrong
or what would cause this message to appear even if the # of arguments
that I have matches to the stored proc?

J
 
It appears that everything matches up, yet I still get the Too Many
Arguments Specified error. Can anyone tell me what I am doing wrong
or what would cause this message to appear even if the # of arguments
that I have matches to the stored proc?

I would suggest that you remove the string fields, try it and then put the
fields back to determine if data coming in the string fields are not causing
a problem.


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4460 (20090926) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
I would suggest that you remove the string fields, try it and then put the
fields back to determine if data coming in the string fields are not causing
a problem.

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4460 (20090926) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
------------------------------------------------------
Thank you, I tried that but it did not work.

I removed all of the parameters and then started to replace them one
by one, when I got to the 16th parameter, that is when I started
receiving the error message. So ASP.NET limits you to 15 parameters
on an update statement?
 
I would suggest that you remove the string fields, try it and then put the
fields back to determine if data coming in the string fields are not
causing
a problem.

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4460 (20090926) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
------------------------------------------------------
Thank you, I tried that but it did not work.

I removed all of the parameters and then started to replace them one
by one, when I got to the 16th parameter, that is when I started
receiving the error message. So ASP.NET limits you to 15 parameters
on an update statement?

--------------------------------------------------------------------

No, the limit is a lot more than that. It's based on the number of parms
that the sproc accepts. And ASP.NET is not the one that is charge here.

ADO.NET is what you're using to access SQL Server in your application not
ASP.NET.

I suggest that if you have SQL Server Manager on the machine, you execute
the sproc that way in a testing situation, pass the parms to the sproc using
New Query in SQL Server Manager executing the sproc.

If I recall, there is something I recall about doing a ADO.NET
SQLCommandObj.Clear() to get things set correctly, as a correction/workarond
method for this stuation in code. Look it up use Bing or Google.





__________ Information from ESET NOD32 Antivirus, version of virus signature database 4465 (20090928) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
Back
Top