title: Stored Procedure not working from ASP.NET
body: <p>I have the following stored procedure:</p>
  <pre><code>alter proc SPCP_ProgramUpdate
      @ID int, 
      @UserID int,
      @Name nvarchar(150),
      @University int,
      @Level tinyint,
      @isActive bit
      as
      update tblUniversityProgram set University_Fkey = @University, Level_Fkey = @Level, Program_Name = @Name, EditDate = GETDATE(), EditUser = @UserID, isActive = @isActive
      where tblUniversityProgram.ID = @ID
  </code></pre>
  <p>When I run the stored procedure from SSMS, it works as intended.</p>
  <p>However, when I run that stored procedure from ASP.NET using this code:</p>
  <pre><code>Dim varDbconn As New SqlConnection
  Dim varDbcomm As SqlCommand
  Dim varDbRead As SqlDataReader
  varDbconn.ConnectionString = ConfigurationManager.ConnectionStrings(&quot;CPDB_ConnectionString&quot;).ToString
  
  varDbconn.Open()
  
  If Request.QueryString(&quot;program&quot;) &lt;&gt; &quot;&quot; Then
      varDbcomm = New SqlCommand(&quot;SPCP_ProgramUpdate&quot;, varDbconn)
      varDbcomm.CommandType = CommandType.StoredProcedure
      varDbcomm.Parameters.AddWithValue(&quot;@ID&quot;, Request.QueryString(&quot;program&quot;)).DbType = DbType.Int32
      varDbcomm.Parameters.AddWithValue(&quot;@UserID&quot;, Session(&quot;UserID&quot;)).DbType = DbType.Int32
      varDbcomm.Parameters.AddWithValue(&quot;@University&quot;, Session(&quot;DecryptID&quot;)).DbType = DbType.Int32
      varDbcomm.Parameters.AddWithValue(&quot;@Level&quot;, ddlLevel.SelectedValue).DbType = DbType.Byte
      varDbcomm.Parameters.AddWithValue(&quot;@isActive&quot;, chkisActive.Checked).DbType = DbType.Boolean
      varDbcomm.Parameters.AddWithValue(&quot;@Name&quot;, txttitle.Text).DbType = DbType.String
  
      varDbcomm.ExecuteNonQuery()
      varDbcomm.Dispose()
  
  Else
  ....
  
  End IF
  
  varDbconn.Close()
  </code></pre>
  <p>nothing happens.</p>
  <p>Any ideas?</p>