title: Procedure or function x has too many arguments specified
body: <p>I have a gridview with the following SqlDataSource:</p>
  
  <pre><code>&lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" 
              ConnectionString="&lt;%$ ConnectionStrings:ConnString%&gt;" 
              SelectCommand="SELECT IDC, DESCPREVIEW, ADESCPREVIEW, DESC, ADESC, DATETOs, Active, HAVEIMG FROM CONTENT ORDER BY IDC DESC "
              UpdateCommand="[SP_UPDATE_CONTENT]" 
              UpdateCommandType="StoredProcedure"&gt;
              &lt;UpdateParameters&gt;
                  &lt;asp:Parameter Name="IDC" Type="Int32" /&gt;
                 &lt;asp:Parameter Name="DESCPREVIEW" Type="String" /&gt;
                  &lt;asp:Parameter Name="DESC" Type="String" /&gt;
                  &lt;asp:Parameter Name="DATETOs" Type="String" /&gt;
                  &lt;asp:Parameter Name="active" Type="Boolean" /&gt;
              &lt;/UpdateParameters&gt;
  &lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>The Stored procedure has these parameters defined:</p>
  
  <pre><code>alter PROCEDURE [dbo].[SP_UPDATE_CONTENT]
  
  @IDC AS INT,
  @DESCPREVIEW AS NVARCHAR(800),
  @DESC  AS NVARCHAR(1500),
  @DATETOs AS VARCHAR(10),
  @active as bit
  </code></pre>
  
  <p>I am getting the following error on Update:</p>
  
  <pre><code>[SqlException (0x80131904): Procedure or function SP_UPDATE_CONTENT has too many arguments specified.]
     System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +1753346
     System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5295154
     System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +242
     System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady) +1682
     System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +269
     System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite) +1325
     System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean asyncWrite) +175
     System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) +205
     System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +160
     System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +380
     System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +670
     System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +87
     System.Web.UI.WebControls.GridView.HandleUpdate(GridViewRow row, Int32 rowIndex, Boolean causesValidation) +1210
     System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +738
     System.Web.UI.WebControls.GridView.OnBubbleEvent(Object source, EventArgs e) +89
     System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
     System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e) +88
     System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
     System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +121
     System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +156
     System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
     System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
     System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9643314
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
  </code></pre>
  
  <p>Although these are the same exact parameters</p>
  
  <p>What could be going wrong here?</p>