none
Update en dataset RRS feed

  • Pregunta

  • estoy actualizando por medio de listatableadapter en base1dataset el código que pegue arriba es el del botón de la ejecución de dicha instrucción update (MODIFICAR)....

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
            Me.LISTATableAdapter.MODIFICAR(IDTextBox.Text, NOMTextBox.Text, DIMTextBox.Text, PESTextBox.Text, LONTextBox.Text, SUPTextBox.Text, CORTextBox.Text, KAMTextBox.Text, PROTextBox.Text, MANTextBox.Text, BAUTextBox.Text, MADTextBox.Text, PERISTextBox.Text, FECHADateTimePicker.Text, NOMTextBox.Text)
            Me.LISTATableAdapter.Fill(Me.Base1DataSet.LISTA)
        End Sub

    no tira ningun error nada de nada... solo ejecuto y guarda como mostre arriba....

    codigo completo:

    Public Class Form1
    
        Private Sub LISTABindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles LISTABindingNavigatorSaveItem.Click
            Me.Validate()
            Me.LISTABindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.Base1DataSet)
    
        End Sub
    
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
            'TODO: esta línea de código carga datos en la tabla 'Base1DataSet.LISTA' Puede moverla o quitarla según sea necesario.
            Me.LISTATableAdapter.Fill(Me.Base1DataSet.LISTA)
    
        End Sub
    
        Private Sub PROTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub MANTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub BAUTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub MADTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub PERISTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub FECHADateTimePicker_ValueChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub IDTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub NOMTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub DIMTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub PESTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub LONTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub SUPTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub CORTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub KAMTextBox_TextChanged(sender As Object, e As EventArgs)
    
        End Sub
    
        Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
            Form2.Show()
        End Sub
    
        Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
            Me.Close()
        End Sub
    
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Me.LISTATableAdapter.INSERTAR(IDTextBox.Text, NOMTextBox.Text, DIMTextBox.Text, PESTextBox.Text, LONTextBox.Text, SUPTextBox.Text, CORTextBox.Text, KAMTextBox.Text, PROTextBox.Text, MANTextBox.Text, BAUTextBox.Text, MADTextBox.Text, PERISTextBox.Text, FECHADateTimePicker.Text)
            Me.LISTATableAdapter.Fill(Me.Base1DataSet.LISTA)
        End Sub
    
        Private Sub LISTADataGridView_CellContentClick(sender As Object, e As DataGridViewCellEventArgs)
    
        End Sub
    
        Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
            Dim loFila As DataGridViewRow = Me.LISTADataGridView.CurrentRow()
            LISTADataGridView.Rows.Remove(loFila)
        End Sub
    
        Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
            Me.LISTATableAdapter.FillBy(Me.Base1DataSet.LISTA, NOMTextBox.Text)
        End Sub
    
        Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
            Me.LISTATableAdapter.MODIFICAR(IDTextBox.Text, NOMTextBox.Text, DIMTextBox.Text, PESTextBox.Text, LONTextBox.Text, SUPTextBox.Text, CORTextBox.Text, KAMTextBox.Text, PROTextBox.Text, MANTextBox.Text, BAUTextBox.Text, MADTextBox.Text, PERISTextBox.Text, FECHADateTimePicker.Text, NOMTextBox.Text)
            Me.LISTATableAdapter.Fill(Me.Base1DataSet.LISTA)
        End Sub
    End Class

    AYUDENME POR FAVOR... MUCHAS GRACIAS

    jueves, 12 de enero de 2017 23:04