Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Try
If con.State <> ConnectionState.Open Then con.Open()
cmd.CommandText = " UPDATE ALLUGTAMIL SET '" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox9.Text & "','" & TextBox10.Text & "','" & TextBox11.Text & "','" & TextBox12.Text & "','" & TextBox13.Text & "','" & TextBox14.Text & "','" & TextBox15.Text & "','" & TextBox16.Text & "','" & TextBox17.Text & "','" & TextBox18.Text & "','" & TextBox19.Text & "','" & TextBox20.Text & "','" & TextBox21.Text & "','" & TextBox22.Text & "','" & TextBox23.Text & "','" & TextBox24.Text & "','" & TextBox25.Text & "','" & TextBox26.Text & "','" & TextBox27.Text & "','" & TextBox28.Text & "','" & TextBox29.Text & "','" & TextBox30.Text & "','" & TextBox31.Text & "','" & TextBox32.Text & "','" & TextBox33.Text & "','" & TextBox34.Text & "','" & TextBox35.Text & "','" & TextBox36.Text & "','" & TextBox37.Text & "','" & TextBox38.Text & "','" & TextBox39.Text & "','" & TextBox40.Text & "','" & TextBox41.Text & "','" & TextBox42.Text & "','" & TextBox43.Text & "','" & TextBox44.Text & "','" & TextBox45.Text & "','" & TextBox46.Text & "','" & TextBox47.Text & "','" & TextBox48.Text & "','" & TextBox49.Text & "','" & TextBox50.Text & "','" & TextBox51.Text & "','" & TextBox52.Text & "','" & TextBox53.Text & "','" & TextBox54.Text & "','" & TextBox55.Text & "','" & TextBox56.Text & "','" & TextBox57.Text & "','" & TextBox58.Text & "','" & TextBox59.Text & "','" & TextBox60.Text & "','" & TextBox61.Text & "','" & TextBox62.Text & "','" & TextBox63.Text & "','" & TextBox64.Text & "','" & TextBox65.Text & "','" & TextBox66.Text & "','" & TextBox67.Text & "','" & TextBox68.Text & "','" & TextBox69.Text & "','" & TextBox70.Text & "','" & TextBox71.Text & "','" & TextBox72.Text & "','" & TextBox73.Text & "','" & TextBox74.Text & "','" & TextBox75.Text & "','" & TextBox76.Text & "','" & TextBox77.Text & "','" & TextBox78.Text & "','" & TextBox79.Text & "','" & TextBox80.Text & "','" & TextBox81.Text & "','" & TextBox82.Text & "','" & TextBox83.Text & "','" & TextBox84.Text & "','" & TextBox85.Text & "','" & TextBox86.Text & "','" & TextBox87.Text & "','" & TextBox88.Text & "','" & TextBox89.Text & "','" & TextBox90.Text & "','" & TextBox91.Text & "','" & TextBox92.Text & "','" & TextBox93.Text & "','" & TextBox94.Text & "','" & TextBox95.Text & "','" & TextBox96.Text & "','" & TextBox97.Text & "','" & TextBox98.Text & "','" & TextBox99.Text & "','" & TextBox100.Text & "','" & TextBox101.Text & "','" & TextBox102.Text & "','" & TextBox103.Text & "','" & TextBox104.Text & "','" & TextBox105.Text & "','" & TextBox106.Text & "','" & TextBox107.Text & "','" & TextBox108.Text & "','" & TextBox109.Text & "' WHERE REG_NO = '" & TextBox1.Text & "' "
If cmd.ExecuteNonQuery > 0 Then
MsgBox("STUDENT MARKS RECORD UPDATED")
Clear_Text()
Else
MsgBox("STUDENT RECORD NOT FOUND")
Clear_Text()
End If
If con.State <> ConnectionState.Closed Then con.Close()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information)
End Try
End Sub