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()

lol its kinda messy and what line exactly it gives error ? :)

what is the error?

Thanks i got a solution from another forum...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.