如有以下客户收款表:
此主题相关图片如下:qq截图20161226154945.png

我要确保其中6个字段:帐期、姓名、证件号码、帐款性质、缴费年月、社保险种
在整个表中组合后的唯一性。
在表属性的
DataColChanged事件中代码如下:Select Case e.DataCol.Name
Case "帐期","姓名","证件号码","帐款性质","缴费年月","社保险种"
Dim cnt As Integer = e.DataTable.SQLCompute( "Count([_Identify])", _
"帐期 = '" & e.DataRow("帐期") & "' And " & _
"姓名 = '" & e.DataRow("姓名") & "' And " & _
"证件号码 = '" & e.DataRow("证件号码") & "' And " & _
"帐款性质 = '" & e.DataRow("帐款性质") & "' And " & _
"缴费年月 = '" & e.DataRow("缴费年月") & "' And " & _
"社保险种 = '" & e.DataRow("社保险种") & "'" )
e.DataRow("UNIQUE检查") = cnt
End If
End Select
但是整表运行 重置列 要将近2分钟!之后才会在"UNIQUE检查"列显示结果。
是不是这样检查太菜鸟了?