Visual Basic: Check to see if there are any pending changes to a dataset and ask the client if they want to save them

Platform:Visual Basic
Task:Check to see if there are any pending changes to a dataset and ask the client if they want to save them
Discussion:
Check to see if there are any pending changes to a dataset and ask the client if they want to save them
Example:
Private Sub AskToSaveDataset()
        'see if the dataset has been modified, if so ask to save the edits
        If AKRODataSet.HasChanges = True Then
            Dim ReallySave As Integer = MsgBox("Save edits?", MsgBoxStyle.YesNo, "Dataset has changes")
            If ReallySave = 6 Then
                SaveDataset()
            End If
        End If
    End Sub
Back to Index