试试这样
For i = 0 To rsSource.Fields.Count - 1
If rsSource(i) <> rsdes1(i) Then
check(i) = True
Else
check(i) = False
End If
Next
For i = 0 To rsSource.Fields.Count - 1
If rsSource(i) <> rsdes1(i) Then
check(i) = True
Else
check(i) = False
End If
Next
Dim strsource As String
Dim strdes As String
Dim i As Integer
For i = 0 To rsSource.Fields.Count - 1
If rsSource(rsSource(i).Name) <> rsdes1(rsSource(i).Name) Then
cmpdata = True
exit function
end if
Next
End Function
a=select count(*) from table1 join table2
b=select count(*) from table1
if a=b then
ok
end if
好象是这样吧