How to: Locate Changed Data in a DataSet (Visual Basic)
This example uses the DataSet.HasChanges and the DataSet.GetChanges methods to check for and locate modified DataRow objects.
Private Sub GetChangedRows()
If dsNorthwind1.HasChanges Then
Dim changedRecords As DataSet
changedRecords = dsNorthwind1.GetChanges(DataRowState.Modified)
Else
MessageBox.Show("No Changes Found")
End If
End Sub
This example requires:
A project reference to System.data.dll.
Access to the members of the System.Data namespace. Add an Imports statement if you are not fully qualifying member names in your code. For more information, see Imports Statement.
A dataset named
DsNorthwind1
.
Accessing Data (Visual Studio)
Preparing Your Application to Receive Data
Editing Data in Your Application