Ver Mensaje Individual
  #5 (permalink)  
Antiguo 29/08/2002, 09:31
hexbin
 
Fecha de Ingreso: julio-2002
Mensajes: 91
Antigüedad: 22 años, 10 meses
Puntos: 0
Re: Que hacer si no hay registro

Saben no me funciono, creo que tengo que abrir la conexión de la sentencia, cosa que que no quiero realizar, por que estoy utilizando GetRows

Set Ob_Conn = Server.CreateObject ("ADODB.Connection")
Set Ob_RS = Server.CreateObject ("ADODB.RecordSet")
Ob_Conn.Open "Hibridos"
if linea <> "" then
slt = "Select * from hibridos where distrito='"&distrito&"' AND linea='"&linea&"'"
else
slt = "Select * from hibridos where distrito='"&distrito&"'"
end if
set rs = Ob_Conn.Execute(slt)

If Ob_RS.EOF Then
'no se han encontrado registros
Else
Tabla = rs.GetRows
Datos = True
End If

Set Ob_Conn = Nothing
Set Ob_RS = Nothing

Este es el código, y como ven Ob_RS.EOF es nulo porque nunca se abre. Lo que necesito más que nada es saber si el GetRow esta vacío o no.