Very strange.
I'm comparing a value from an array to a field in the database, in a "for" loop, for each record.
The first cell in the array, never matches, though there IS a match in one of the records (I mean that it acts as if there is no match).
The next cells r doing great.
The wierd thing is that when I replace the first value with other value in the array (switch places), again the first (now different) value never matches, and the one that did not match before does now.
When I don't use the loop and not an array, but just put a string and compare it to the field, it's ok too.
Seems I'm not aware of something in the array or loop things.
I checke dthe values in the array, and also in the fields, and checked if each cell is checked, and all r true.
I USE:
dim match
match="no"
for iLoop=LBound(MyArray) to UBound(MyArray)
if rs.fields("myField"=MyArray(iLoop) then
Response.Write("<td align=center><IMG src=picture1.gif'></td>"
match="yes"
end if
Next
-------------------------------
If I just try comparing(no loops, no for)in the following way, I have no probelm:
if rs.fields("myField"="typingfirstValue" then
Response.Write("<td align=center><IMG src=picture1.gif'></td>"
match="yes"
end if
Thanks
I'm comparing a value from an array to a field in the database, in a "for" loop, for each record.
The first cell in the array, never matches, though there IS a match in one of the records (I mean that it acts as if there is no match).
The next cells r doing great.
The wierd thing is that when I replace the first value with other value in the array (switch places), again the first (now different) value never matches, and the one that did not match before does now.
When I don't use the loop and not an array, but just put a string and compare it to the field, it's ok too.
Seems I'm not aware of something in the array or loop things.
I checke dthe values in the array, and also in the fields, and checked if each cell is checked, and all r true.
I USE:
dim match
match="no"
for iLoop=LBound(MyArray) to UBound(MyArray)
if rs.fields("myField"=MyArray(iLoop) then
Response.Write("<td align=center><IMG src=picture1.gif'></td>"
match="yes"
end if
Next
-------------------------------
If I just try comparing(no loops, no for)in the following way, I have no probelm:
if rs.fields("myField"="typingfirstValue" then
Response.Write("<td align=center><IMG src=picture1.gif'></td>"
match="yes"
end if
Thanks