whitetea
asked on
arry string compare
There are 5 string fields. The string sets will be an arry i=0 to j.
My question is how can I get the most common string set?
Do I need to use two arrys to compare the 5 strings 0-j times?
Thank you for your help. I'm new here and don't have any idea.
My question is how can I get the most common string set?
Do I need to use two arrys to compare the 5 strings 0-j times?
Thank you for your help. I'm new here and don't have any idea.
Can you show some code/example? What versions of VB are you using ?
ASKER
Dim i as interger
Dim j as interger
string1 as string
string2 as string
string3 as string
For i = 1 To j - 1
With Results(i)
If String.IsNullOrEmpty(.Stri ng1.ToStri ng) = False And _
String.IsNullOrEmpty(.Stri ng2.ToStri ng) = False And _
String.IsNullOrEmpty(.Stri ng3.ToStri ng) = False Then
Response.Write(.String1)
Response.Write(.String2)
Response.Write(.String3)
ElseIf String.IsNullOrEmpty(.Stri ng1.ToStri ng) = False And _
String.IsNullOrEmpty(.Stri ng2.ToStri ng) = False Then
Response.Write(.String1)
Response.Write(.String2)
ElseIf String.IsNullOrEmpty(.Stri ng1) = False And _
String.IsNullOrEmpty(.Stri ng3) = False Then
Response.Write(.String1)
Response.Write(.String3)
ElseIf String.IsNullOrEmpty(.Stri ng2) = False And _
String.IsNullOrEmpty(.Stri ng3) = False Then
Response.Write(.String2)
Response.Write(.String3)
Else
End If
End With
Next i
I get more than one result returned. This is wrong. I only want one string set return with most field fill in (some of them are empty)
I'm using Visual studio 2005.
Thank you.
Dim j as interger
string1 as string
string2 as string
string3 as string
For i = 1 To j - 1
With Results(i)
If String.IsNullOrEmpty(.Stri
String.IsNullOrEmpty(.Stri
String.IsNullOrEmpty(.Stri
Response.Write(.String1)
Response.Write(.String2)
Response.Write(.String3)
ElseIf String.IsNullOrEmpty(.Stri
String.IsNullOrEmpty(.Stri
Response.Write(.String1)
Response.Write(.String2)
ElseIf String.IsNullOrEmpty(.Stri
String.IsNullOrEmpty(.Stri
Response.Write(.String1)
Response.Write(.String3)
ElseIf String.IsNullOrEmpty(.Stri
String.IsNullOrEmpty(.Stri
Response.Write(.String2)
Response.Write(.String3)
Else
End If
End With
Next i
I get more than one result returned. This is wrong. I only want one string set return with most field fill in (some of them are empty)
I'm using Visual studio 2005.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.