I am using visual basic as the coding language.
conSQL.Open()
Dim cmd As New SqlCommand("update Phd_Student set student_name = '" + studentnameTextBox.Text + "' where student_id = '" + studentidno.Text + "'", conSQL)
cmd.ExecuteNonQuery()
conSQL.Close()
This does not change the value of the record. I created a breakpoint at line 2 and found that the value of studentnameTextBox.Text in the query is the old value even though I changed the text of the textbox in the form.
Would appreciate any help.