下面代码中涉及到“_Identify”字段,请问老师临时表如何拥有这样一个相同功能的“_Identify”字段?(主键)
Dim idx As String = "-1,"
Dim idx_temp As String = ""
Dim pdr As DataRow = Nothing
Dim count As Integer = 0
Dim cs As String = "字段1"
For Each dr As DataRow In DataTables("table1").Select("", cs)
Dim flag As Boolean = False
If pdr IsNot Nothing Then
For Each c As String In cs.split(",")
If pdr(c).replace(" ","") <> dr(c).replace(" ", "") Then
flag = True
Exit For
End If
Next
If flag Then
If count > 1 Then
idx &= idx_temp
End If
count = 1
idx_temp = ""
Else
count += 1
idx_temp &= dr("_Identify") & ","
End If
Else
count += 1
End If
pdr = dr
Next
If count > 1 Then
idx &= idx_temp
End If
Tables("table1").filter = "_Identify not In (" & idx.trim(",") & ")"