Solved

UPDATE  has too many arguments specified

Posted on 2015-02-18
3
59 Views
Last Modified: 2015-02-25
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

0
Comment
Question by:edjones1
3 Comments
 
LVL 25

Assisted Solution

by:Lee Savidge
Lee Savidge earned 100 total points
ID: 40616108
Run a SQL trace on the database and see what SQL is being sent to the SQL server.
0
 
LVL 19

Accepted Solution

by:
Manoj Patil earned 400 total points
ID: 40616272
Hello,
Check the database log for this. Or SQL Trace like Lee has said. You can check with SQL Default Trace.
To check whether default trace is running or not run below command.

SELECT* FROM sys.configurations WHERE configuration_id = 1568

Open in new window


If it is not enabled then run below query to run it.
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'default trace enabled', 1;
GO
RECONFIGURE;
GO

Open in new window


Now to check the Error Log get below Query.

SELECT  TE.name AS [EventName] ,

        T.DatabaseName ,

        t.DatabaseID ,

        t.NTDomainName ,

        t.ApplicationName ,

        t.LoginName ,

        t.SPID ,

        t.StartTime ,

        t.TextData ,

        t.Severity ,

        t.Error

FROM    sys.fn_trace_gettable(CONVERT(VARCHAR(150), ( SELECT TOP 1

                                                              f.[value]

                                                      FROM    sys.fn_trace_getinfo(NULL) f

                                                      WHERE   f.property = 2

                                                    )), DEFAULT) T

        JOIN sys.trace_events TE ON T.EventClass = TE.trace_event_id

WHERE   te.name = 'ErrorLog'

Open in new window


Check below link for further details.

https://www.simple-talk.com/sql/performance/the-default-trace-in-sql-server---the-power-of-performance-and-security-auditing/
0
 
LVL 45

Expert Comment

by:Vitor Montalvão
ID: 40616538
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
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Replacing HTML tags in Textarea/Textbox 5 29
Help with SQL Query 23 39
How to calculate iops? 12 27
t-sql splitting string column 5 27
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now