Procedure or function has too many arguments specified

I keep getting the error. I just can find out why this is happening..



: Sys.WebForms.PageRequestManagerServerErrorException: Procedure or function Update_IV_Actions has too many arguments specified.


CREATE PROCEDURE [dbo].[Update_IV_Actions]
@IVRECORDID int,
@Actions_Completed int,
@Completed_Action nvarchar(max),
--@SignoffDate datetime,
@IV_Completed int


AS

UPDATE [I_IV_Actions]
SET [Actions_Completed] = @Actions_Completed
           ,[Completed_Action] = @Completed_Action
           ,[SignoffDate] = getdate()
           ,[IV_Completed] = @IV_Completed


WHERE IVRECORDID = @IVRECORDID

Open in new window


<asp:FormView ID="fvActionComp" runat="server" DataKeyNames="ID" DataSourceID="dsActionRecord" DefaultMode="Edit">
                              <EditItemTemplate>
                                  <br />

                                      <asp:TextBox ID="IVRecordIDTextBox" runat="server" Text='<%# Eval("IVRecordID")%>' />
                                  <table class="table table-hover table-condensed table-responsive">
                                      <tr>
                                          <td>DateAdded: </td>
                                          <td>
                                              <asp:TextBox ID="DateAddedTextBox" runat="server" ReadOnly="True" Text='<%# Eval("DateAdded")%>' />
                                          </td>
                                      </tr>
                                      <tr>
                                          <td>AddedBy:</td>
                                          <td>
                                              <asp:DropDownList ID="ddlIQAActionRaised" runat="server" AppendDataBoundItems="True" data-live-search="true" DataSourceID="DSListStaff" DataTextField="STAFFNAME" DataValueField="STAFFID" Enabled="False" SelectedValue='<%# Eval("AddedBy")%>'>
                                                  <asp:ListItem Value="0">-Select-</asp:ListItem>
                                              </asp:DropDownList>
                                          </td>
                                      </tr>
                                      <tr>
                                          <td>IV_Actioned: </td>
                                          <td>
                                              <asp:DropDownList ID="ddlIQAActionRaised0" runat="server" AppendDataBoundItems="True" data-live-search="true" DataSourceID="DSListStaff" DataTextField="STAFFNAME" DataValueField="STAFFID" Enabled="False" SelectedValue='<%# Eval("IV_Actioned")%>'>
                                                  <asp:ListItem Value="0">-Select-</asp:ListItem>
                                              </asp:DropDownList>
                                          </td>
                                      </tr>
                                      <tr>
                                          <td>Actions_Needed:</td>
                                          <td>&nbsp;</td>
                                      </tr>
                                      <tr>
                                          <td colspan="2">
                                              <asp:TextBox ID="Actions_CompletedTextBox" runat="server" Rows="5" Text='<%# Eval("Flagged_Action")%>' TextMode="MultiLine" Width="400px" Enabled="False" ReadOnly="True" />
                                          </td>
                                      </tr>
                                      <tr>
                                          <td class="auto-style3">Actions Satisfied?<asp:CheckBox ID="chkActionsSatisfied" runat="server" AutoPostBack="True" OnCheckedChanged="chkActionsSatisfied_CheckedChanged" Checked='<%# Bind("Actions_Completed")%>' />
                                          </td>
                                          <td class="auto-style3">&nbsp;</td>
                                      </tr>
                                  </table>
                               
                                  <table class="table table-hover table-condensed table-responsive" id="IVActionUpdate" runat="server" visible ="false">
                                      <tr>
                                          <td>IV Comments</td>
                                          <td>&nbsp;</td>
                                      </tr>
                                      <tr>
                                          <td colspan="2">
                                              <asp:TextBox ID="Actions_CompletedTextBox0" runat="server" Rows="5" Text='<%# Bind("Completed_Action")%>' TextMode="MultiLine" Width="400px" />
                                          </td>
                                      </tr>
                                      <tr>
                                          <td>IV Signoff Name</td>
                                          <td>
                                              <asp:DropDownList ID="ddlIQAActionClosedBy" runat="server" AppendDataBoundItems="True" data-live-search="true" DataSourceID="DSListStaff" DataTextField="STAFFNAME" DataValueField="STAFFID" SelectedValue='<%# Bind("IV_Completed")%>'>
                                                  <asp:ListItem Value="0">-Select-</asp:ListItem>
                                              </asp:DropDownList>
                                          </td>
                                      </tr>
                                      <tr>
                                          <td>&nbsp;</td>
                                          <td>
                                              <asp:Button ID="btnUpdateActions" runat="server" CommandName="Update" Text="SignOff"  />
                                          </td>
                                      </tr>
                                  </table>
                                  <br />
                                  &nbsp;<br />
                                  <br />
                                  &nbsp;<br />
                                  <br />
                                  &nbsp;<br /> &nbsp;&nbsp;
                              </EditItemTemplate>
                              <InsertItemTemplate>
                               <%--   IVRecordID:
                                  <asp:TextBox ID="IVRecordIDTextBox" runat="server" Text='<%# Bind("IVRecordID") %>' />
                                  <br />
                                  DateAdded:
                                  <asp:TextBox ID="DateAddedTextBox" runat="server" Text='<%# Bind("DateAdded") %>' />
                                  <br />
                                  AddedBy:
                                  <asp:TextBox ID="AddedByTextBox" runat="server" Text='<%# Bind("AddedBy") %>' />
                                  <br />
                                  IV_Actioned:
                                  <asp:TextBox ID="IV_ActionedTextBox" runat="server" Text='<%# Bind("IV_Actioned") %>' />
                                  <br />
                                  Actions_Completed:
                                  <asp:TextBox ID="Actions_CompletedTextBox" runat="server" Text='<%# Bind("Actions_Completed") %>' />
                                  <br />
                                  SignoffDate:
                                  <asp:TextBox ID="SignoffDateTextBox" runat="server" Text='<%# Bind("SignoffDate") %>' />
                                  <br />
                                  IV_Completed:
                                  <asp:TextBox ID="IV_CompletedTextBox" runat="server" Text='<%# Bind("IV_Completed") %>' />
                                  <br />
                                  <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" />
                                  &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />--%>
                              </InsertItemTemplate>
                              <ItemTemplate>
                            <%--      ID:
                                  <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
                                  <br />
                                  IVRecordID:
                                  <asp:Label ID="IVRecordIDLabel" runat="server" Text='<%# Bind("IVRecordID") %>' />
                                  <br />
                                  DateAdded:
                                  <asp:Label ID="DateAddedLabel" runat="server"  />
                                  <br />
                                  AddedBy:
                                  <asp:Label ID="AddedByLabel" runat="server" Text='<%# Bind("AddedBy") %>' />
                                  <br />
                                  IV_Actioned:
                                  <asp:Label ID="IV_ActionedLabel" runat="server" Text='<%# Bind("IV_Actioned") %>' />
                                  <br />
                                  Actions_Completed:
                                  <asp:Label ID="Actions_CompletedLabel" runat="server" Text='<%# Bind("Actions_Completed") %>' />
                                  <br />
                                  SignoffDate:
                                  <asp:Label ID="SignoffDateLabel" runat="server" Text='<%# Bind("SignoffDate") %>' />
                                  <br />
                                  IV_Completed:
                                  <asp:Label ID="IV_CompletedLabel" runat="server" Text='<%# Bind("IV_Completed") %>' />--%>
                                  <br />
                              </ItemTemplate>
                          </asp:FormView>

Open in new window


Datasource

<asp:SqlDataSource ID="dsActionRecord" runat="server" ConnectionString="<%$ ConnectionStrings:IrisConnectionString %>" SelectCommand="GET_IV_Actions" SelectCommandType="StoredProcedure" UpdateCommand="Update_IV_Actions" UpdateCommandType="StoredProcedure">
                              <SelectParameters>
                                   <asp:SessionParameter Name="IVRECORDID" SessionField="IVRECORDID" Type="Int32" />
                              </SelectParameters>
                              <UpdateParameters>
                                    <asp:Parameter Name="IVRECORDID" Type="Int32" />
                               <asp:Parameter Name="Actions_Completed" Type="Int32" />
                         <asp:Parameter Name="Completed_Action" Type="String" />
                                         <asp:Parameter Name="IV_Completed" Type="Int32" />
                              </UpdateParameters>
                          </asp:SqlDataSource>

Open in new window

EdAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Easwaran ParamasivamCommented:
In EditItemTemplate I could see the parameters which are not in the dataset such as  Eval("DateAdded"), Eval("AddedBy") and so on. Have the fields in a way that parameters specified in SP, present in the EditItemTemplate fields.
EdAuthor Commented:
I'd se the incorrect DataKeyNames.

DataKeyNames="ID"

Should be

DataKeyNames="IVRECORDID"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EdAuthor Commented:
I found the correction myself
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.