Cuando hago esta comprobación:
Código:
Lo hace bien y me da una respusta correcta, pero si uso un bucle FOR para que compruebe del 1 al 100, da en todos que no cuando hay mucho que deberia dar si (la variable existe). lo hago así:ces = 1 DO UNTIL va.EOF If CInt(va("CCesta")) = ces then existe="si" EXIT DO else existe="no" end if va.MoveNext Loop If existe = "si" then Response.write("<a href='contenido.asp?cesta=28'><img border='0' src='imagenes/rojo.jpg'></a>") else Response.write("<img src='imagenes/gris.jpg'>") end if
Código:
Es que no entiendo porque no me sale... he probado tb con while y nada, he escrito el resultado de ces en las 100 vueltas y lo hace bien, entonces, yo creo que falla el IF For ces = 1 to 100 DO UNTIL va.EOF If CInt(va("CCesta")) = ces then existe="si" EXIT DO else existe="no" end if va.MoveNext Loop If existe = "si" then Response.write("<a href='contenido.asp?cesta=28'><img border='0' src='imagenes/rojo.jpg'></a>") else Response.write("<img src='imagenes/gris.jpg'>") end if next