-
Hello,
Is there a quick way to compare a string against an array of strings to see if it exists without having to loop through? Also, what is the max count an array can have and what is the longest string it can hold?
Code:
Dim myArray() As String
Do Until rs.EOF
'check rs![Field1] vs array, if it does not exist then add it
rs.MoveNext
Loop
Thanks,
Thai
-
If the array is sorted you could use a binary search technique which could speed things up enormously. Otherwise you need to check them all.
As for size... I'd worry more about running out of RAM than exhausting the limits (probably about 32bit signed, so 2gb strings and 2 billion (ish) array entries).