DataColChanging事件参考以下代码
Select Case e.DataCol.Name
Case "RuleCode"
Dim dr As DataRow = e.DataTable.Find("RuleCode = '" & e.NewValue & "' and [_Identify] <> " & e.DataRow("_Identify") )
If dr IsNot Nothing Then
msgbox("规则编码不能重复!")
e.Cancel = True
End If
End Select
灾难恢复:http://www.foxtable.com/help/topics/1057.htm