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. Advertisements

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. DC Gringo

    too many arguments in public function?

    DC Gringo, Aug 11, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    873
    Bruce Barker
    Aug 12, 2005
  2. Mike P
    Replies:
    0
    Views:
    3,599
    Mike P
    Jun 19, 2006
  3. Mike
    Replies:
    3
    Views:
    597
  4. jobs
    Replies:
    0
    Views:
    865
  5. David Lozzi
    Replies:
    0
    Views:
    880
    David Lozzi
    Mar 2, 2007
  6. Seth Williams
    Replies:
    1
    Views:
    709
    Seth Williams
    Sep 16, 2008
  7. Joe
    Replies:
    3
    Views:
    705
    Mr. Arnold
    Sep 29, 2009
  8. c676228
    Replies:
    2
    Views:
    374
    c676228
    Sep 14, 2006
Loading...