|
-
Aug 10th, 2000, 11:06 PM
#1
Thread Starter
Addicted Member
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
-
Aug 10th, 2000, 11:57 PM
#2
Fanatic Member
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).
Paul Dwyer 
Network Engineer
Aussie In Tokyo
Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|