Clipper/FiveWin - PROBLEMA CON !EOF()

 
Vista:

PROBLEMA CON !EOF()

Publicado por Gerardo Ortiz (10 intervenciones) el 08/03/2004 17:50:08
HOLA A TODOS LOS PROGRAMADORES:

PRESENTO EL SIGUIENTE PROBLEMA:

HAGO UNA BUSQUEDA EN UNA BASE DE DATOS DE LA SIGUIENTE MANERA:

SELECT DATAFAC
SEEK busqueda
If found()
Do while !eof() .and. factura = busqueda
…………..
instrucciones
……………
skip
Enddo
ENDIF
***************************************
ME LOCALIZA TODOS LOS REGISTROS QUE CUMPLEN LA CONDICION TAL COMO DEBE SER, PERO SUCEDE QUE CUANDO LA CONDICION YA NO SE CUMPLE (ES DECIR CUANDO "FACTURA ES DIFERENTE DE BUSQUEDA) ME MARCA EL ERROR -ERROR BASE/1077 ARGUMENT ERROR .NOT. - Y EN LA LOGICA SOLO DEBERIA SALIR DEL DO WHILE.

LA BASE DE DATOS TIENE APROX: 35000 REGISTROS

ESPERO QUE ALGUIEN DE POR AQUI PUDIERA DAR UNA SOLUCION

SALUDOS
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:PROBLEMA CON !EOF()

Publicado por Néstor (39 intervenciones) el 08/03/2004 19:20:03
Hola: Sácale el !eof()

SELECT DATAFAC
SEEK busqueda
If found()
Do while factura = busqueda
…………..
instrucciones
……………
skip
Enddo
ENDIF

Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

RE:PROBLEMA CON !EOF()

Publicado por Gustavo Alvarez Gambini (274 intervenciones) el 08/03/2004 22:27:42
Estás seguro que el error te lo da en la línea del do while !EOF() ?
Eso tendría que funcionar bien aunque te aconsejaría que utilices.

DbSelectAr( "DATAFAC" )
DATAFAC->( DbSetOrder( "el indice que deseas" ) )
If DATAFAC->( DbSeek( Busqueda ) )
Do While DATAFAC->( !EOF() ) .AND. DATAFAC->Factura == Busqueda
....
Instrucciones
DATAFAC->( DbSkip() )
EndDo
EndIf
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:PROBLEMA CON !EOF()

Publicado por jose manuel gonzalez (15 intervenciones) el 12/03/2004 23:10:26
...
...mclave = dato
seek dato
do while !Eof ()
If campo = dato
instrucciones
else
skip
loop
endIf
Skip
EndDo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar