none
l'exception invalidoperationexception unhandled update requires a valid updat command when passed DataRow collection with modified rows RRS feed

  • Discussion générale

  • Hello;

    I recive 
    the following message when i make the seconde debug :

    "the only invalidoperationexception was unhandled"

    updateRequiresa validcommandupdatWhenPassedDataRowcollectionwithmodifiedrows.

    the code is the following:
     

    Public Class Form1
        Private Sub AdressesBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdressesBindingNavigatorSaveItem.Click
            Me.Validate()
            Me.AdressesBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.FirstDAtabaseDataSet)
        End Sub
        Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
            Me.AdressesBindingSource.EndEdit()
            Me.AdressesTableAdapter.Update(Me.FirstDAtabaseDataSet.Adresses)
        End Sub
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'TODO : cette ligne de code charge les données dans la table 'FirstDAtabaseDataSet.Adresses'. Vous pouvez la déplacer ou la supprimer selon vos besoins.
            Me.AdressesTableAdapter.Fill(Me.FirstDAtabaseDataSet.Adresses)
        End Sub
    End Class



    thanks!.




    • Modifié avicene mardi 29 mai 2012 20:33
    samedi 26 mai 2012 15:05