Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click con1.Open() cmd.Connection = con1 cmd.CommandText = "update Employee set Emp_Name='" & TextBox2.Text & "',Address='" & TextBox3.Text & "',Position='" & TextBox4.Text & "',NIC_No='" & TextBox5.Text & "',Marital_Status='" & TextBox6.Text & "',Department='" & TextBox7.Text & "',Date_of_Join='" & TextBox8.Text & "',Contact_No=" & TextBox9.Text & " where Emp_ID='" & Textbox1.Text & "'" x = cmd.ExecuteNonQuery() If (x = 1) Then MsgBox("Update Success") End If con1.Close() clear()
↧
error in update statement..how to correct it?
↧