Ver Mensaje Individual
  #7 (permalink)  
Antiguo 23/04/2002, 00:19
Nochero
 
Fecha de Ingreso: febrero-2002
Ubicación: Mi ASP Bunker
Mensajes: 397
Antigüedad: 23 años, 2 meses
Puntos: 1
Re: Problema con if then

A ver Rashid, intenta abrir el recordset con este codigo :

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Session("Conexion")
Set RS = Server.CreateObject("ADODB.Recordset")
RS.CursorType = 3
RS.CursorLocation = 3
sql = "SELECT * FROM MiArchivo"
RS.Open sql, conn

RESPONSE.WRITE( RS.RecordCount & " registros.") ' Aca tiene que tirar > 0 , sino no hay registros y menos aun paths ni imagenes.

If RS.RecordCount=0 then
Response.Write("No hay registros !")
else
If Trim( RS("PathI1") ) = "" Then
Response.Write "No hay fotos disponibles !"
Else
Response.Write("Puede que exista la foto.")
End If
End if

A tener en cuenta :
Retorna registros ?
Es ese el nombre del campo ? PathI1 ?
No estara con valor Null ? ( que da bastantes problemas )
Es tipo Text ?
El archivo esta vacio ?
Probaste con algun registro con path e imagen que realmente existan ?
eh ?

noseque+, Saludos