Too Many Arguments Specified Error

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
 
M

Mr. Arnold

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
 
J

Joe

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?
 
M

Mr. Arnold

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top