For Each dr As DataRow In e.DataTable.DataRows Dim s As String = "" Dim s1 As String = "" For Each dc As DataCol In e.DataTable.DataCols s + = e.DataRow(dc.Name) s1 + = dr(dc.Name) Next If dr("_Identify") <> e.DataRow("_Identify") AndAlso s = s1 Then MessageBox.Show("记录重复") Exit For End If Next