objCommand.Connection = objConnection
                                                    objCommand.CommandText = "UPDATE tblEnrollment" & _
                                                                             "SET dateOfHIVDx = @dateOfHIVDx, " & _
                                                                             "CD4CountAtDx = @CD4CountAtDx, " & _
                                                                             "WHOStgAtDx = @WHOStgAtDx, " & _
                                                                             "ptInitiatedART = @ptInitiatedART, " & _
                                                                             "ARVRegimen = @ARVRegimen, " & _
                                                                             "recentWHOStg = @recentWHOStg, " & _
                                                                             "dateOfRecWHOStg = @dateOfRecWHOStg, " & _
                                                                             "recentCD4Count = @recentCD4Count, " & _
                                                                             "dateOfRecCD4Cnt = @dateOfRecCD4Cnt WHERE patientID ='" & patientID & "'"
                                                    objCommand.CommandType = CommandType.Text
                                                    objCommand.Parameters.AddWithValue("@dateOfHIVDx", .datePickerDateOfHIVDx.Value.Date)
                                                    objCommand.Parameters.AddWithValue("@CD4CountAtDx", .txtCD4CountAtDx.Text)
                                                    objCommand.Parameters.AddWithValue("@WHOStgAtDx", .cboWHOStgATDx.Text)
                                                    objCommand.Parameters.AddWithValue("@ptInitiatedART", .cboPtInitiatedART.Text)
                                                    objCommand.Parameters.AddWithValue("@ARVRegimen", .cboARVRegimen.Text)
                                                    objCommand.Parameters.AddWithValue("@recentWHOStg", .cboRecentWHOStage.Text)
                                                    objCommand.Parameters.AddWithValue("@dateOfRecWHOStg", .datePickerDateOfRecentWHOStage.Value.Date)
                                                    objCommand.Parameters.AddWithValue("@recentCD4Count", .txtRecentCD4Count.Text)
                                                    objCommand.Parameters.AddWithValue("@dateOfRecCD4Cnt", .datePickerDate.Value.Date)
                                                    objConnection.Open()
                                                    objCommand.ExecuteNonQuery()
                                                    objConnection.Close()
This article has been dead for over six months. Start a new discussion instead.