论坛迁移,数据丢了。上次有个大侠给了代码
If DataTables("表A").HasChanges Then
Dim Result As DialogResult
Result = MessageBox.Show("保存?", "提示", MessageBoxButtons.YesNoCancel , MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
DataTables("表A").Save
ElseIf Result = DialogResult.No Then
DataTables("表A").RejectChanges
ElseIf Result = DialogResult.Cancel
e.Cancel = True
Return
End If
End If
If DataTables("表A").HasChanges Then
Dim Result As DialogResult
Result = MessageBox.Show("保存?", "提示", MessageBoxButtons.YesNoCancel , MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
DataTables("表A").Save
ElseIf Result = DialogResult.No Then
DataTables("表A").RejectChanges
ElseIf Result = DialogResult.Cancel
e.Cancel = True
Return
End If
End If