Link to home
Start Free TrialLog in
Avatar of Ed
EdFlag for United Kingdom of Great Britain and Northern Ireland

asked on

UPDATE has too many arguments specified

I keep getting the error

UPDATE_Compliance_DETAILS has too many arguments specified

When I try to update a record using this formview and stored procedure.

I can see what it is.  

I'm updating via a formview using a stored procedure. I cannot see how there are too many arguments specified. Help!

SP

ALTER PROCEDURE [dbo].[UPDATE__Compliance_DETAILS]

@IVRecordID int,
@CREDITSCORRECT bit,
@RULESCOMBINATIONCORRECT bit,
@ILPINPLACE bit,
@ILPUPTODATE bit,
@HAVEPREVIOUSACTIONSCOMPLETED bit,
@ISDELIVERYMODELINPLACE bit,
@ISDELIVERYMODELUPTODATE bit


AS
BEGIN

SET NOCOUNT ON;

UPDATE [I_COMPLIANCE] 

SET 
[CREDITSCORRECT] = @CREDITSCORRECT, 
[RULESCOMBINATIONCORRECT] = @RULESCOMBINATIONCORRECT, 
[ILPINPLACE] = @ILPINPLACE , 
[ILPUPTODATE] = @ILPUPTODATE, 
[HAVEPREVIOUSACTIONSCOMPLETED] = @HAVEPREVIOUSACTIONSCOMPLETED, 
[ISDELIVERYMODELINPLACE] = @ISDELIVERYMODELINPLACE,
[ISDELIVERYMODELUPTODATE] = @ISDELIVERYMODELUPTODATE 
 WHERE IVRECORDID = @IVRECORDID

End

Open in new window



Formview
<asp:FormView ID="FormView1" runat="server" DataKeyNames="ID" DataSourceID="dsIQACompliance" EnableModelValidation="True" DefaultMode="Edit">
            <EditItemTemplate>
                <table id="IQAComplianceTable0" runat="server" class="auto-style1">
                    <tr>
                        <td>Credits Correct?</td>
                        <td>
                            <asp:RadioButtonList ID="rbtnCC" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Eval("CREDITSCORRECT")%>'>
                                <asp:ListItem Value="True">Yes</asp:ListItem>
                                <asp:ListItem Value="False">No</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td>Rules Of Combination Correct</td>
                        <td>
                            <asp:RadioButtonList ID="rbtnROCC" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Eval("RULESCOMBINATIONCORRECT", "{0}")%>'>
                                <asp:ListItem Value="True">Yes</asp:ListItem>
                                <asp:ListItem Value="False">No</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td>ILP in Place</td>
                        <td>
                            <asp:RadioButtonList ID="rbtnILP" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Eval("ILPINPLACE", "{0}")%>'>
                                <asp:ListItem Value="True">Yes</asp:ListItem>
                                <asp:ListItem Value="False">No</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td>ILP UptoDate</td>
                        <td>
                            <asp:RadioButtonList ID="rbtnILPUTD" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Eval("ILPUPTODATE", "{0}")%>'>
                                <asp:ListItem Value="True">Yes</asp:ListItem>
                                <asp:ListItem Value="False">No</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td>Have Previous Action Been Completed?</td>
                        <td>
                            <asp:RadioButtonList ID="rbtnPABC" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Eval("HAVEPREVIOUSACTIONSCOMPLETED", "{0}")%>'>
                                <asp:ListItem Value="True">Yes</asp:ListItem>
                                <asp:ListItem Value="False">No</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td>Is the Delivery Model in Place</td>
                        <td>
                            <asp:RadioButtonList ID="rbtnDMIP" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Eval("ISDELIVERYMODELINPLACE", "{0}")%>'>
                                <asp:ListItem Value="True">Yes</asp:ListItem>
                                <asp:ListItem Value="False">No</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <td>Is The Delivery Model Up to Date</td>
                        <td>
                            <asp:RadioButtonList ID="rbtnDMUTD" runat="server" RepeatDirection="Horizontal" SelectedValue='<%# Eval("ISDELIVERYMODELUPTODATE", "{0}")%>'>
                                <asp:ListItem Value="True">Yes</asp:ListItem>
                                <asp:ListItem Value="False">No</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
          
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnSaveCompliance" runat="server" Text="Save" CommandName="Update" />
                            <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" />
                        </td>
                        <td>&nbsp;</td>
                    </tr>
                </table>
                <br />
                <br />
            </EditItemTemplate>
            <InsertItemTemplate>
             
            </InsertItemTemplate>
        </asp:FormView

Open in new window

>


SQL Datasource

<asp:SqlDataSource ID="dsIQACompliance" runat="server" ConnectionString="<%$ ConnectionStrings:IrisConnectionString %>"  SelectCommand="SELECT * FROM [I_IQA_COMPLIANCE] WHERE ([IVRECORDID] = @IVRECORDID)" UpdateCommand="UPDATE_IQA_Compliance_DETAILS" UpdateCommandType="StoredProcedure">
            <SelectParameters>
                <asp:ControlParameter ControlID="GridIVRecs" DefaultValue="" Name="IVRECORDID" PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
            <UpdateParameters>
<%--                <asp:Parameter Name="IVRECORDID" Type="Int32" />--%>
                <asp:Parameter Name="IVRecordID" Type="Int32" />
                <asp:Parameter Name="CREDITSCORRECT" Type="Boolean" />
                <asp:Parameter Name="RULESCOMBINATIONCORRECT" Type="Boolean" />
                <asp:Parameter Name="ILPINPLACE" Type="Boolean" />
                <asp:Parameter Name="ILPUPTODATE" Type="Boolean" />
                <asp:Parameter Name="HAVEPREVIOUSACTIONSCOMPLETED" Type="Boolean" />
                <asp:Parameter Name="ISDELIVERYMODELINPLACE" Type="Boolean" />
                <asp:Parameter Name="ISDELIVERYMODELUPTODATE" Type="Boolean" />
            </UpdateParameters>
        </asp:SqlDataSource>

Open in new window

SOLUTION
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The SP's doesn't have the same name. They are similar but not the same.

UPDATE__Compliance_DETAILS --> Created in SQL Server
UPDATE_IQA_Compliance_DETAILS --> Called from Data Source