You are on page 1of 1

Private Sub btnModificar_Click(ByVal sender As System.Object, ByVal e As Sys tem.EventArgs) Handles btnModificar.

Click Dim sSql As String sSql = "UPDATE cliente SET nombre = '" & txtNombre.Text & "', apellido = '" & txtApellido.Text & "'" sSql += " WHERE rut = '" & txtRut.Text & "'" Dim Command As New SqlCommand(sSql, connection) Dim iResultado As Integer connection.Open() iResultado = Command.ExecuteNonQuery() connection.Close() limpiar() End Sub Private Sub btnBorrar_Click(ByVal sender As System.Object, ByVal e As System .EventArgs) Handles btnBorrar.Click Dim sSql As String sSql = "DELETE FROM cliente WHERE rut = '" & txtRut.Text & "'" Dim Command As New SqlCommand(sSql, connection) Dim iResultado As Integer connection.Open() iResultado = Command.ExecuteNonQuery() connection.Close() limpiar() End Sub Private Sub btnConectar_Click(ByVal sender As System.Object, ByVal e As Syst em.EventArgs) Handles btnConectar.Click End Sub End Class

You might also like