Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/04/2002, 22:28
Avatar de AlZuwaga
AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 24 años, 2 meses
Puntos: 535
Re: Problema con if then

No, son dos IF!

el primer IF debería comprobar que exista el registro...

Cita:
Either BOF or EOF is True, or the current record has been deleted; the operation requested by the application requires a current record
En resumen, no existe el registro solicitado.

Ahora, si existe el registro pero este no contiene el path a la imagen, hay otra comprobacion mediante un segundo IF.

Quedaría algo como esto:

Código:
If Frs.EOF AND Frs.EOF then
Response.Write "El registro solicitado no existe"

Else

If LEN(TRIM(Frs.Fields("PathI1"))) <> 0 Then
Response.Write("<IMG BORDER=0 SRC=" & chr(34) & Frs.Fields("PathI1") & chr(34) & ">")
Else
Response.Write "No hay imagen disponible para este registro."
End If 

End if
saludos