title: UPDATE statement not updating DB
body: <pre><code>Protected Sub dgResult_ItemCommand(ByVal source As System.Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgResult.ItemCommand
  
  If strErr = "" Then
  Dim ddl As DropDownList = CType(e.Item.FindControl("ddlClassificationType"), DropDownList)
  
  Dim defaultValue As Boolean = ddl.SelectedItem.Text.Contains("*")
  
  Dim originalValue As String = String.Empty
  
  If defaultValue = False Then
  
  'update AppDetail
  
  strErr = appDetailDBA.UpdateAppDetail(appCode, subCode, ddl.SelectedValue, Today.Date)
  
  End If
  
     If strErr = "" Then
  
   lblError.Text = msgClass.successMsg(subCodeName, "1")
  
          Else
  
              lblError.Text = msgClass.ErrorMsg(subCodeName, "1")
  
          End If
  
          dgResult.DataSource = appDetailDBA.getDataClassification(empID, txtSearch.Text)
  
      dgResult.DataBind()
  
      End Sub
  
  
  
  Function UpdateAppDetail(ByVal appCode As String, ByVal subCode As String, ByVal classType As String, ByVal classEffDte As String)
  
  
  Dim strErr As String = ""
          Dim con As New SqlConnection(kiosk_loginConnStr)
          con.Open()
  
          Try
              Dim sqlCommand As SqlCommand = con.CreateCommand()
              Dim sql As String = "Update AppDetail SET ClassificationType = '" + classType + "', ClassificationEffDate = '" + classEffDte + "' WHERE AppCode = '" + appCode + "'" &amp; _
                                " AND SubCode = '" + subCode + "'"
  
              sqlCommand.CommandText = sql
              sqlCommand.ExecuteNonQuery()
          Catch ex As Exception
              strErr = ex.Message
          Finally
              con.Close()
          End Try
  
          Return strErr
      End Function
  </code></pre>