title: Procedure or Function has too many arguments specified in ASP.NET using VB.NEt
body: <p>Every time I run my update function I generate a Procedure or Function has too many arguments specified error and I think I have been looking at this for too long because I can't find the root cause. Any guidance would be appreciated. </p>
  
  <p>My VB.NET code is as follows:</p>
  
  <pre><code>    Public Function UpdateGenInfo_E1_01_02(ByVal pstrCon As String, _
                                       ByVal appNo As String, _
                                       ByVal revNo As String, _
                                       ByVal prName As String, _
                                       ByVal prAddr As String, _
                                       ByVal prAddr2 As String, _
                                       ByVal prCity As String, _
                                       ByVal prState As String, _
                                       ByVal prZip As String) As Integer
      Try
  
  
          'Create parameter
          Dim lsqlParams(8) As SqlParameter
          'fill parameter
  
          lsqlParams(0) = New SqlParameter("@AppNo", appNo)
          lsqlParams(1) = New SqlParameter("@RevNo", revNo)
          lsqlParams(2) = New SqlParameter("@PrName", prName)
          lsqlParams(3) = New SqlParameter("@PrAddr", prAddr)
          lsqlParams(4) = New SqlParameter("@PrAddr2", prAddr)
          lsqlParams(5) = New SqlParameter("@PrCity", prCity)
          lsqlParams(6) = New SqlParameter("@PrState", prState)
          lsqlParams(7) = New SqlParameter("@PrZip", prZip)
          'Return dataset
          Return SqlHelper.ExecuteNonQuery(pstrCon, CommandType.StoredProcedure, "up_UpdateGenInfo_E1_01_02", lsqlParams)
      Catch ex As Exception
          'Throw error
  
          Throw ex
      End Try
  End Function
  </code></pre>
  
  <p>My Stored Procedure is as follows:</p>
  
  <pre><code>USE [EpUpdates]
  GO
  /****** Object:  StoredProcedure [dbo].[up_UpdateGenInfo_E1_01_02]    Script Date: 04/26/2013 12:00:24 ******/
  SET ANSI_NULLS OFF
  GO
  SET QUOTED_IDENTIFIER OFF
  GO
  ALTER PROCEDURE [dbo].[up_UpdateGenInfo_E1_01_02] 
  (
  
     @AppNo varchar(10),
     @RevNo varchar(4),
     @PrName varchar(10),
     @PrAddr varchar(50),
     @PrAddr2 varchar(50),
     @PrCity varchar(30),
     @PrState varchar(2),
     @PrZip varchar(10)
  )
  AS
     UPDATE EpUpdates.dbo.GenInfo_E1_01_02
     SET    PrName=@PrName,
            PrAddr=@PrAddr,
            PrAddr2= @PrAddr2,
            PrCity=@PrCity,
            PrState=@PrState,
            PrZip=@PrZip  
     WHERE (AppNo = @AppNo) 
       AND (RevNo = @RevNo)
  </code></pre>