Too Many Arguments Specified Error

Discussion in 'ASP .Net' started by Joe, Sep 26, 2009.

  1. Joe

    Joe Guest

    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
    Joe, Sep 26, 2009
    #1
    1. Advertising

  2. Joe

    Mr. Arnold Guest

    "Joe" <> wrote in message
    news:...

    > 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
    Mr. Arnold, Sep 26, 2009
    #2
    1. Advertising

  3. Joe

    Joe Guest

    On Sep 26, 3:27 pm, "Mr. Arnold" <MR. > wrote:
    > "Joe" <> wrote in message
    >
    > news:...
    >
    > > 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

    ------------------------------------------------------
    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?
    Joe, Sep 28, 2009
    #3
  4. Joe

    Mr. Arnold Guest

    "Joe" <> wrote in message
    news:...
    On Sep 26, 3:27 pm, "Mr. Arnold" <MR. > wrote:
    > "Joe" <> wrote in message
    >
    > news:...
    >
    > > 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

    ------------------------------------------------------
    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
    Mr. Arnold, Sep 29, 2009
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike P
    Replies:
    0
    Views:
    3,283
    Mike P
    Jun 19, 2006
  2. Mike
    Replies:
    3
    Views:
    478
  3. David Lozzi
    Replies:
    0
    Views:
    676
    David Lozzi
    Mar 2, 2007
  4. Seth Williams
    Replies:
    1
    Views:
    563
    Seth Williams
    Sep 16, 2008
  5. John Smith

    Procedure or function has too many arguments specified

    John Smith, Jun 29, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    138
    John Smith
    Jun 29, 2005
Loading...

Share This Page