Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/12/2002, 10:39
Avatar de bakanzipp
bakanzipp
 
Fecha de Ingreso: noviembre-2001
Ubicación: santiago de shilli
Mensajes: 2.554
Antigüedad: 23 años, 5 meses
Puntos: 0
y por que no pruebas usando un exit loop con una condicion simple?

Código:
fecha=date()
flag=true
while flag=true

 sql="select * from tabla where fecha='" & fecha & "';"
 set rs =conexion.execute(sql)
 if not rs.eof and not rs.bof then
   flag = false
 else
  fecha = dateAdd("d",-1,fecha)
 end if

wend
ASI SE SALDRA CUANDO ENCUENTRE REGISTROS SEGUN LA FECHA....

ESO SI..ANTES DE ESTO DEBES CONTROLAR SI LA TABLA POSEE REGISTROS..PORQUE SINO EL LOOP SERA INFINITO.