0

次のエラーが表示されます。

「プロシージャまたは関数 'USP_UPDATE_CUSTOMER_CONTACT_FORM に指定された引数が多すぎます」

このトピックに関する多くの投稿を読み、その多くを実装しましたfixesが、まだ同じエラーが表示されます。誰でも私を助けてもらえますか?

更新ボタンが選択されたときに 3 つの個別のテーブルを更新するフォームがあります。を使用してこの操作を実行することにしましたstore procedure in the SQL Database。ストアド プロシージャと ASP フォーム コード。

どんな助けでも大歓迎です!

ありがとう!ケリー

SQL ストアド プロシージャ:

ALTER PROCEDURE [dbo].[USP_UPDATE_CUSTOMER_CONTACT_FORM]
        @CUSTOMER_ID INT,
        @CUSTOMER_FIRST_NAME VARCHAR(150),
        @CUSTOMER_MIDDLE_NAME VARCHAR(150),
        @CUSTOMER_LAST_NAME VARCHAR(150),
        @CUSTOMER_AD_SOURCE_ID INT,
        @CUSTOMER_CURRENT_CONTROL_ID INT,
        @CUSTOMER_CURRENT_STATUS_ID INT,
        @CUSTOMER_CURRENT_PROGRESS_ID INT,
        @CUSTOMER_INITIAL_CONTACT_TYPE_ID INT,
        @CUSTOMER_STORE_ID INT,
        @CUSTOMER_BDC_REP_ID INT,
        @ADDRESS_LINE_1 VARCHAR(150),
        @ADDRESS_CITY VARCHAR(150),
        @ADDRESS_STATE VARCHAR(150),
        @ADDRESS_ZIP_CODE VARCHAR(150),
        @PHONE_NUMBER VARCHAR(30),
        @PHONE_NUMBER_2 VARCHAR(30),
        @PHONE_NUMBER_3 VARCHAR(30)



AS
    BEGIN
    UPDATE CUSTOMER
    SET CUSTOMER_FIRST_NAME = @CUSTOMER_FIRST_NAME,
        CUSTOMER_MIDDLE_NAME = @CUSTOMER_MIDDLE_NAME,
        CUSTOMER_LAST_NAME = @CUSTOMER_LAST_NAME,
        CUSTOMER_AD_SOURCE_ID = @CUSTOMER_AD_SOURCE_ID,
        CUSTOMER_CURRENT_CONTROL_ID = @CUSTOMER_CURRENT_CONTROL_ID,
        CUSTOMER_CURRENT_STATUS_ID = @CUSTOMER_CURRENT_STATUS_ID,
        CUSTOMER_CURRENT_PROGRESS_ID = @CUSTOMER_CURRENT_PROGRESS_ID,
        CUSTOMER_INITIAL_CONTACT_TYPE_ID = @CUSTOMER_INITIAL_CONTACT_TYPE_ID,
        CUSTOMER_STORE_ID = @CUSTOMER_STORE_ID,
        CUSTOMER_BDC_REP_ID = @CUSTOMER_AD_SOURCE_ID

    WHERE 
        CUSTOMER_ID = @CUSTOMER_ID;

    UPDATE CUSTOMER_ADDRESS
    SET ADDRESS_LINE_1 = @ADDRESS_LINE_1,
        ADDRESS_CITY = @ADDRESS_CITY,
        ADDRESS_STATE = @ADDRESS_STATE,
        ADDRESS_ZIP_CODE = @ADDRESS_ZIP_CODE
    WHERE
        ADDRESS_CUSTOMER_ID = @CUSTOMER_ID
        AND ADDRESS_SEQ_NUMBER = 
        (SELECT MAX(B.ADDRESS_SEQ_NUMBER)
        FROM CUSTOMER_ADDRESS B
        WHERE B.ADDRESS_CUSTOMER_ID = ADDRESS_CUSTOMER_ID);


    UPDATE CUSTOMER_PHONE
    SET PHONE_NUMBER = @PHONE_NUMBER,
        PHONE_NUMBER_2 = @PHONE_NUMBER_2,
        PHONE_NUMBER_3 = @PHONE_NUMBER_3
    WHERE
        PHONE_CUSTOMER_ID = @CUSTOMER_ID
        AND PHONE_SEQ_NUMBER = 
        (SELECT MAX(B.PHONE_SEQ_NUMBER)
        FROM CUSTOMER_PHONE B
        WHERE B.PHONE_CUSTOMER_ID = PHONE_CUSTOMER_ID);

END

ASPX フォーム コード:

 <asp:FormView ID="CUSTOMER_CONTACT_INFO" runat="server" DataSourceID="DS_CUSTOMER_CONTACT1" Font-Bold="True" 
        Font-Names="Calibri" Font-Size="12pt" ForeColor="#1F497D" style="margin-left: 1px; margin-bottom: 1px; margin-top: 0px;" Width="1000px"              DefaultMode="Edit" DataKeyNames="CUSTOMER_ID" Height="268px" EditRowStyle-VerticalAlign="Top">
        <EditItemTemplate>
            CUSTOMER:&nbsp;&nbsp; &nbsp;<asp:Label ID="Label3" runat="server" Enabled="False" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" ForeColor="#0070C0" Text='<%# Bind("CUSTOMER_NUMBER", "{0}") %>'></asp:Label>
            &nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="CUSTOMER_FIRST_NAME" runat="server" 
                AutoCompleteType="FirstName" Font-Bold="True" 
                Font-Names="Calibri" Font-Size="12pt" Font-Underline="True" 
                ForeColor="#0070C0" Text='<%# Bind("CUSTOMER_FIRST_NAME", "{0}")%>' Width="100px" 
                CausesValidation="True" />
&nbsp;
            <asp:TextBox ID="CUSTOMER_MIDDLE_NAME" runat="server" 
                AutoCompleteType="MiddleName" Font-Bold="True" 
                Font-Names="Calibri" Font-Size="12pt" Font-Underline="True" 
                ForeColor="#0070C0" Text='<%# Bind("CUSTOMER_MIDDLE_NAME", "{0}")%>' Width="75px" CausesValidation="True" />
&nbsp;
            <asp:TextBox ID="CUSTOMER_LAST_NAME" runat="server" AutoCompleteType="LastName" 
                AutoPostBack="True" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" 
                Font-Underline="True" ForeColor="#0070C0" Text='<%# Bind("CUSTOMER_LAST_NAME", "{0}")%>' 
                Width="100px" CausesValidation="True" Wrap="False" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PHONE:&nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="PHONE_NUMBERTextBox" runat="server" AutoPostBack="True" 
                Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" ForeColor="#0070C0" 
                Text='<%# Bind("PHONE_NUMBER", "{0}")%>' Width="100px" Font-Underline="True" />
&nbsp;
            <asp:TextBox ID="PHONE_ALT1_NUMBERTextBox" runat="server" AutoPostBack="True" 
                Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" ForeColor="#0070C0" 
                Text='<%# Bind("PHONE_NUMBER_2", "{0}")%>' Width="100px" Font-Underline="True" />
            &nbsp;
            <asp:TextBox ID="PHONE_ALT2_NUMBERTextBox" runat="server" AutoPostBack="True" 
                Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" ForeColor="#0070C0" 
                Text='<%# Bind("PHONE_NUMBER_3", "{0}")%>' Width="100px" Font-Underline="True" />
            <br />
            ADDRESS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:TextBox ID="ADDRESS_LINE_1" runat="server" 
                AutoCompleteType="HomeStreetAddress" AutoPostBack="True" Font-Bold="True" 
                Font-Names="Calibri" Font-Size="12pt" Font-Underline="True" 
                ForeColor="#0070C0" Text='<%# Bind("ADDRESS_LINE_1", "{0}")%>' Width="283px" />
            &nbsp;&nbsp;<asp:TextBox ID="ADDRESS_CITY" runat="server" AutoCompleteType="HomeCity" 
                AutoPostBack="True" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" 
                Font-Underline="True" ForeColor="#0070C0" 
                Text='<%# Bind("ADDRESS_CITY", "{0}")%>' />
            &nbsp;&nbsp;<asp:TextBox ID="STATETextBox" runat="server" AutoCompleteType="HomeState" 
                AutoPostBack="True" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" 
                Font-Underline="True" ForeColor="#0070C0" Text='<%# Bind("ADDRESS_STATE", "{0}")%>' 
                Width="25px" />
            &nbsp;&nbsp;<asp:TextBox ID="ZIPCODETextBox" runat="server" 
                AutoCompleteType="HomeZipCode" AutoPostBack="True" Font-Bold="True" 
                Font-Names="Calibri" Font-Size="12pt" Font-Underline="True" 
                ForeColor="#0070C0" Text='<%# Bind("ADDRESS_ZIP_CODE", "{0}")%>' Width="73px" />
            &nbsp;<asp:Label ID="Label4" runat="server" Text='<%# Bind("CUSTOMER_ID")%>' Visible="False"></asp:Label>
&nbsp;<hr align="left" noshade="noshade" size="2" 
        style="border-color: #1F497D; color: #1F497D" width="1000" /><span class="style2">STATUS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
            <asp:RadioButtonList ID="STATUS_RADIO_BUTTON" runat="server" CssClass="visibility:hidden" DataSourceID="DS_VAL_STATUS_TYPE_TABLE" DataTextField="VAL_STATUS_DESC" DataValueField="VAL_STATUS_ID" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" ForeColor="#A6A6A6" RepeatDirection="Horizontal" RepeatLayout="Flow" SelectedValue='<%# Bind("CUSTOMER_CURRENT_STATUS_ID", "{0}")%>' Enabled="False" Height="25px">
            </asp:RadioButtonList>
            <asp:SqlDataSource ID="DS_VAL_STATUS_TYPE_TABLE" runat="server" ConnectionString="<%$ ConnectionStrings:DS_FreedomRidesConnect %>" SelectCommand="SELECT DISTINCT * FROM [VAL_STATUS] ORDER BY [VAL_STATUS_SORT_ORDER]"></asp:SqlDataSource>
            <span class="style2">
            <br />
            PROGRESS:&nbsp;&nbsp;&nbsp;&nbsp;</span>
            <asp:RadioButtonList ID="PROGRESS_RADIO_BUTTON" runat="server" DataSourceID="DS_VAL_PROGRESS_TABLE" DataTextField="VAL_PROGRESS_DESC" DataValueField="VAL_PROGRESS_ID" Enabled="False" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" ForeColor="#A6A6A6" RepeatDirection="Horizontal" RepeatLayout="Flow" SelectedValue='<%# Bind("CUSTOMER_CURRENT_PROGRESS_ID", "{0}")%>' Height="25px">
            </asp:RadioButtonList>
                     <asp:SqlDataSource ID="DS_VAL_PROGRESS_TABLE" runat="server" ConnectionString="<%$ ConnectionStrings:DS_FreedomRidesConnect %>" SelectCommand="SELECT DISTINCT * FROM [VAL_PROGRESS] ORDER BY [VAL_PROGRESS_SORT_ORDER]"></asp:SqlDataSource>
            <hr align="left" noshade="noshade" size="2" 
        style="border-color: #1F497D; color: #1F497D" width="1000" />
            <span class="style2">CONTROL:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
            <asp:RadioButtonList ID="CONTROL_RADIO_BUTTON" runat="server" AutoPostBack="True" DataSourceID="DS_VAL_CONTROL_TABLE" DataTextField="VAL_CONTROL_DESC" DataValueField="VAL_CONTROL_ID" Enabled="False" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" ForeColor="#A6A6A6" RepeatDirection="Horizontal" RepeatLayout="Flow" SelectedValue='<%# Bind("CUSTOMER_CURRENT_CONTROL_ID", "{0}")%>'>
            </asp:RadioButtonList>

            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" ForeColor="#1F497D" Text="BDC REP:"></asp:Label>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:DropDownList ID="DropDownList1" runat="server" AutoDSFPostBack="True" DataSourceID="DS_BDC_DROP_DOWN_VALIDATION" DataTextField="EMP_FULL_NAME" DataValueField="EMP_ID" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" Font-Underline="True" ForeColor="#0070C0" SelectedValue='<%# Bind("CUSTOMER_BDC_REP_ID", "{0}")%>' Width="200px">
            </asp:DropDownList>
            <asp:SqlDataSource ID="DS_BDC_DROP_DOWN_VALIDATION" runat="server" ConnectionString="<%$ ConnectionStrings:DS_FreedomRidesConnect %>" SelectCommand="SELECT DEAL_USER_ID AS EMP_ID, DEAL_USER_FIRST_NAME + ' ' + DEAL_USER_LAST_NAME AS EMP_FULL_NAME, DEAL_USER_FIRST_NAME AS EMP_FIRST, DEAL_USER_LAST_NAME AS EMP_LAST FROM ADMIN_EMPLOYEE_USER ORDER BY DEAL_USER_FIRST_NAME, DEAL_USER_LAST_NAME"></asp:SqlDataSource>
            &nbsp;&nbsp;
            <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" ForeColor="#1F497D" Text="STORE: "></asp:Label>
            &nbsp;&nbsp;&nbsp;&nbsp;<asp:DropDownList ID="DropDownList2" runat="server" AutoDSFPostBack="True" CssClass="HideArrow" DataSourceID="DS_STORE_DROP_DOWN_VALIDATION" DataTextField="VAL_STORE_LOCATION" DataValueField="VAL_STORE_ID" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" Font-Underline="True" ForeColor="#0070C0" SelectedValue='<%# Bind("CUSTOMER_STORE_ID", "{0}")%>' Width="200px">
            </asp:DropDownList>
            <asp:SqlDataSource ID="DS_STORE_DROP_DOWN_VALIDATION" runat="server" ConnectionString="<%$ ConnectionStrings:DS_FreedomRidesConnect %>" SelectCommand="SELECT [VAL_STORE_ID], [VAL_STORE_LOCATION] FROM [VAL_STORE] ORDER BY [VAL_STORE_LOCATION]"></asp:SqlDataSource>
            <asp:SqlDataSource ID="DS_VAL_CONTROL_TABLE" runat="server" ConnectionString="<%$ ConnectionStrings:DS_FreedomRidesConnect %>" SelectCommand="SELECT DISTINCT * FROM [VAL_CONTROL] ORDER BY [VAL_CONTROL_SORT_ORDER]"></asp:SqlDataSource>
            <hr align="left" noshade="noshade" size="2" 
        style="border-color: #1F497D; color: #1F497D" width="1000" />
            <span class="style2">INITIAL CONTACT:&nbsp;&nbsp;&nbsp;&nbsp;</span>
            <asp:RadioButtonList ID="INITIAL_CONTACT_RADIO_BUTTON" runat="server" AutoPostBack="True" DataSourceID="DS_VAL_INITIAL_CONTATCT_TABLE" DataTextField="VAL_INITIAL_CONTACT_DESC" DataValueField="VAL_INITIAL_CONTACT_ID" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" Font-Underline="True" ForeColor="#0070C0" RepeatDirection="Horizontal" RepeatLayout="Flow" SelectedValue='<%# Bind("CUSTOMER_INITIAL_CONTACT_TYPE_ID", "{0}")%>' Height="25px">
            </asp:RadioButtonList>

            <asp:SqlDataSource ID="DS_VAL_INITIAL_CONTATCT_TABLE" runat="server" ConnectionString="<%$ ConnectionStrings:DS_FreedomRidesConnect %>" SelectCommand="SELECT * FROM [VAL_INITIAL_CONTACT] ORDER BY [VAL_INITIAL_CONTACT_DESC]"></asp:SqlDataSource>
            <span class="style2">
            <br />
            AD SOURCE:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
            <asp:RadioButtonList ID="STATUS_RADIO_BUTTON0" runat="server" AutoPostBack="True" DataSourceID="DS_VAL_AD_SOURCE_TABLE" DataTextField="VAL_AD_SOURCE_DESC" DataValueField="VAL_AD_SOURCE_ID" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" Font-Underline="True" ForeColor="#0070C0" RepeatDirection="Horizontal" RepeatLayout="Flow" SelectedValue='<%# Bind("CUSTOMER_AD_SOURCE_ID", "{0}")%>' Height="25px">
            </asp:RadioButtonList>

            <hr align="left" noshade="noshade" size="2" 
        style="border-color: #1F497D; color: #1F497D" width="1000" />

            <asp:SqlDataSource ID="DS_VAL_AD_SOURCE_TABLE" runat="server" ConnectionString="<%$ ConnectionStrings:DS_FreedomRidesConnect %>" SelectCommand="SELECT * FROM [VAL_AD_SOURCE] ORDER BY [VAL_AD_SOURCE_DESC]"></asp:SqlDataSource>
            <asp:Panel ID="Panel1" runat="server" style="text-align: center" Width="1000px">
                <asp:Button ID="Button3" runat="server" CommandName="Update" Text="UPDATE" BackColor="White" BorderColor="#1F497D" BorderStyle="Solid" BorderWidth="2px" CssClass="static" Font-Bold="True" Font-Names="Calibri" Font-Size="12pt" ForeColor="#1F497D" CommandArgument="USP_UPDATE_CUSTOMER_CONTACT_FORM" PostBackUrl="~/Customer_Contact.aspx" />
            </asp:Panel>
        </EditItemTemplate>

<EditRowStyle VerticalAlign="Top"></EditRowStyle>

    </asp:FormView>


  <asp:SqlDataSource ID="DS_CUSTOMER_CONTACT1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:DS_FreedomRidesConnect %>" 
       SelectCommand="SELECT MAX(CUSTOMER.CUSTOMER_ID) AS CUSTOMER_ID, MAX(CUSTOMER.CUSTOMER_NUMBER) AS CUSTOMER_NUMBER, MAX(CUSTOMER.CUSTOMER_FIRST_NAME) + ' ' + MAX(CUSTOMER.CUSTOMER_MIDDLE_NAME) + ' ' + MAX(CUSTOMER.CUSTOMER_LAST_NAME) AS CUSTOMER_NAME, MAX(CUSTOMER.CUSTOMER_FIRST_NAME) AS CUSTOMER_FIRST_NAME, MAX(CUSTOMER.CUSTOMER_MIDDLE_NAME) AS CUSTOMER_MIDDLE_NAME, MAX(CUSTOMER.CUSTOMER_LAST_NAME) AS CUSTOMER_LAST_NAME, MAX(CUSTOMER_PHONE.PHONE_NUMBER) AS PHONE_NUMBER, MAX(CASE WHEN ADDRESS_LINE_1 IS NOT NULL AND ADDRESS_CITY IS NOT NULL AND ADDRESS_STATE IS NOT NULL AND ADDRESS_ZIP_CODE IS NOT NULL THEN ADDRESS_LINE_1 + ',   ' + ADDRESS_CITY + ',   ' + ADDRESS_STATE + ',  ' + ADDRESS_ZIP_CODE END) AS FULL_ADDRESS, CUSTOMER_ADDRESS.ADDRESS_LINE_1, CUSTOMER_ADDRESS.ADDRESS_CITY, CUSTOMER_ADDRESS.ADDRESS_STATE, CUSTOMER_ADDRESS.ADDRESS_ZIP_CODE, MAX(CUSTOMER_PHONE.PHONE_ID) AS Expr1, MAX(CUSTOMER_ADDRESS.ADDRESS_ID) AS Expr2, CUSTOMER_PHONE.PHONE_NUMBER_2, CUSTOMER_PHONE.PHONE_NUMBER_3, CUSTOMER_PHONE.PHONE_ACTIVE_IND, CUSTOMER_ADDRESS.ADDRESS_ACTIVE_IND, MAX(CUSTOMER.CUSTOMER_AD_SOURCE_ID) AS CUSTOMER_AD_SOURCE_ID, MAX(CUSTOMER.CUSTOMER_CURRENT_CONTROL_ID) AS CUSTOMER_CURRENT_CONTROL_ID, MAX(CUSTOMER.CUSTOMER_CURRENT_STATUS_ID) AS CUSTOMER_CURRENT_STATUS_ID, MAX(CUSTOMER.CUSTOMER_CURRENT_PROGRESS_ID) AS CUSTOMER_CURRENT_PROGRESS_ID, MAX(CUSTOMER.CUSTOMER_INITIAL_CONTACT_TYPE_ID) AS CUSTOMER_INITIAL_CONTACT_TYPE_ID, MAX(CUSTOMER.CUSTOMER_STORE_ID) AS CUSTOMER_STORE_ID, MAX(CUSTOMER.CUSTOMER_BDC_REP_ID) AS CUSTOMER_BDC_REP_ID FROM CUSTOMER LEFT OUTER JOIN CUSTOMER_PHONE ON CUSTOMER_PHONE.PHONE_CUSTOMER_ID = CUSTOMER.CUSTOMER_ID AND CUSTOMER_PHONE.PHONE_ACTIVE_IND = 'Y' LEFT OUTER JOIN CUSTOMER_ADDRESS ON CUSTOMER_ADDRESS.ADDRESS_CUSTOMER_ID = CUSTOMER.CUSTOMER_ID AND CUSTOMER_ADDRESS.ADDRESS_ACTIVE_IND = 'Y' GROUP BY CUSTOMER.CUSTOMER_ID, CUSTOMER_ADDRESS.ADDRESS_LINE_1, CUSTOMER_ADDRESS.ADDRESS_CITY, CUSTOMER_ADDRESS.ADDRESS_STATE, CUSTOMER_ADDRESS.ADDRESS_ZIP_CODE, CUSTOMER_PHONE.PHONE_NUMBER_2, CUSTOMER_PHONE.PHONE_NUMBER_3, CUSTOMER_PHONE.PHONE_ACTIVE_IND, CUSTOMER_ADDRESS.ADDRESS_ACTIVE_IND HAVING (CUSTOMER.CUSTOMER_ID = @Cust_ID) AND (CUSTOMER_PHONE.PHONE_ACTIVE_IND = N'Y') AND (CUSTOMER_ADDRESS.ADDRESS_ACTIVE_IND = N'Y')" 

        UpdateCommand="USP_UPDATE_CUSTOMER_CONTACT_FORM" UpdateCommandType="StoredProcedure">
        <SelectParameters>
            <asp:FormParameter DefaultValue="100003" FormField="CUST_ID" Name="CUST_ID" />
        </SelectParameters>
        <UpdateParameters>
           <%-- <asp:Parameter Name="CUSTOMER_ID" Type="Int32" />--%>
            <asp:Parameter Direction="Input" Name="CUSTOMER_ID" Type="Int32" />
            <asp:Parameter Direction="Input" Name="CUSTOMER_FIRST_NAME" Type="String" />
            <asp:Parameter Direction="Input" Name="CUSTOMER_MIDDLE_NAME" Type="String" />
            <asp:Parameter Direction="Input" Name="CUSTOMER_LAST_NAME" Type="String" />
            <asp:Parameter Direction="Input" Name="CUSTOMER_AD_SOURCE_ID" Type="Int32" />
            <asp:Parameter Direction="Input" Name="CUSTOMER_CURRENT_CONTROL_ID" Type="Int32" />
            <asp:Parameter Direction="Input" Name="CUSTOMER_CURRENT_STATUS_ID" Type="Int32" />
            <asp:Parameter Direction="Input" Name="CUSTOMER_CURRENT_PROGRESS_ID" Type="Int32" />
            <asp:Parameter Direction="Input" Name="CUSTOMER_INITIAL_CONTACT_TYPE_ID" Type="Int32" />
            <asp:Parameter Direction="Input" Name="CUSTOMER_STORE_ID" Type="Int32" />
            <asp:Parameter Direction="Input" Name="CUSTOMER_BDC_REP_ID" Type="Int32" />

            <asp:Parameter Direction="Input" Name="ADDRESS_LINE_1" Type="String" />
            <asp:Parameter Direction="Input" Name="ADDRESS_CITY" Type="String" />
            <asp:Parameter Direction="Input" Name="ADDRESS_STATE" Type="String" />
            <asp:Parameter Direction="Input" Name="ADDRESS_ZIP_CODE" Type="String" />
            <asp:Parameter Direction="Input" Name="PHONE_NUMBER" Type="String" />
            <asp:Parameter Direction="Input" Name="PHONE_NUMBER_2" Type="String" />
            <asp:Parameter Direction="Input" Name="PHONE_NUMBER_3" Type="String" />
        </UpdateParameters>
    </asp:SqlDataSource>
4

2 に答える 2

0

通常、このエラーは、実行時にストアド プロシージャに渡されるパラメータ ( exec USP_UPDATE_CUSTOMER_CONTACT_FORM) が、ストアド プロシージャのパラメータ リスト内のパラメータの数と同じでないために発生します。異なるため、エラーが発生します。それは通常、エラーが伴うものです。

于 2013-05-14T11:53:27.010 に答える
0

考えられる回避策:
aspx フォーム ページで、Bind("FieldName') を Eva​​l("FieldName") に置き換えます。これは、FormView のすべての Bound フィールドが Update プロシージャに渡されるため です

DS_CUSTOMER_CONTACT1 ) で 試す代わりに
UpdateCommand="USP_UPDATE_CUSTOMER_CONTACT_FORM" UpdateCommandType="StoredProcedure"

UpdateCommand="Exec USP_UPDATE_CUSTOMER_CONTACT_FORM" UpdateCommandType="Text"

于 2013-05-14T12:05:20.127 に答える