Procedure or function has too many arguments specified

J

John Smith

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top