Procedure or function has too many arguments specified

Discussion in 'ASP .Net Web Controls' started by John Smith, Jun 29, 2005.

  1. John Smith

    John Smith Guest

    It seems other people have had this problem, but none of the solutions
    proposed fixes my situation. If someone could review the code below
    and tell me what I'm missing. Thank you!


    <asp:FormView id="LogText" DataKeyNames="LogID" runat="server"
    DataSourceID="dsEdit" DefaultMode="Edit">
    <EditItemTemplate>
    <asp:TextBox id="editText" runat="server" Text='<%#
    Bind("LogText") %>' rows="25" columns="120" TextMode="MultiLine" />
    <asp:Button Text="Save" CommandName="Update"
    runat="server" />
    </EditItemTemplate>
    </asp:FormView>

    <asp:SqlDataSource ID="dsEdit" runat="server"
    ConnectionString="Data Source=(local);Initial
    Catalog=testDB;Integrated Security=True"
    ProviderName="System.Data.SqlClient" SelectCommand="usp_admin_edit"
    UpdateCommand="usp_admin_update" SelectCommandType="StoredProcedure"
    UpdateCommandType="StoredProcedure"
    OldValuesParameterFormatString="{0}">
    <UpdateParameters>
    <asp:parameter name="id" Type="Int32" />
    <asp:ControlParameter name="strLog"
    ControlID="LogText$editText" PropertyName="Text" Type="String" />
    </UpdateParameters>

    <SelectParameters>
    <asp:QueryStringParameter DefaultValue="0" Name="id"
    QueryStringField="LogID" Type="Int32" />
    </SelectParameters>
    </asp:SqlDataSource>




    CREATE PROCEDURE [dbo].[usp_admin_update]
    @id int,
    @strLog text

    AS


    UPDATE tbl_Test
    SET

    LogText = @strLog
    WHERE LogID = @id
     
    John Smith, Jun 29, 2005
    #1
    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,381
    Mike P
    Jun 19, 2006
  2. Mike
    Replies:
    3
    Views:
    506
  3. David Lozzi
    Replies:
    0
    Views:
    732
    David Lozzi
    Mar 2, 2007
  4. Seth Williams
    Replies:
    1
    Views:
    599
    Seth Williams
    Sep 16, 2008
  5. c676228
    Replies:
    2
    Views:
    194
    c676228
    Sep 14, 2006
Loading...

Share This Page