Fórum Repeat. #189633
20/10/2003
0
Como eu utilizo o comando Repeat?
Eu tenho o seguinte comando: Como eu faço para que toda vez que o recordcount do if **** seja igual a um repita o WITH e quando for igual a UM ele passe direto?
with QryAux do
begin
Close;
CommandText := ´select * from FICHALEI where CODUSU = ´+
IntToStr( CODUSU )+ ´ and COMPET = :Par0´;
Params[0].AsDate := Compet;
Open;
end;{ QryAux }
**** if QryAux.RecordCount = 1 then
QryGera.Next;
Eu tenho o seguinte comando: Como eu faço para que toda vez que o recordcount do if **** seja igual a um repita o WITH e quando for igual a UM ele passe direto?
with QryAux do
begin
Close;
CommandText := ´select * from FICHALEI where CODUSU = ´+
IntToStr( CODUSU )+ ´ and COMPET = :Par0´;
Params[0].AsDate := Compet;
Open;
end;{ QryAux }
**** if QryAux.RecordCount = 1 then
QryGera.Next;
Havilux
Curtir tópico
+ 0
Responder
Posts
20/10/2003
Osocram
Nossa... tah meio confuso..
mas acho q eh isso q vc quer
repeat
with QryAux do
begin
Close;
CommandText := ´select * from FICHALEI where CODUSU = ´+
IntToStr( CODUSU )+ ´ and COMPET = :Par0´;
Params[0].AsDate := Compet;
Open;
end;{ QryAux }
QryGera.Next;
until QryAux.RecordCount = 1
*-*-*-*-*-*-*-*
mas acho q no caso vc deveria usar o while...
mas acho q eh isso q vc quer
repeat
with QryAux do
begin
Close;
CommandText := ´select * from FICHALEI where CODUSU = ´+
IntToStr( CODUSU )+ ´ and COMPET = :Par0´;
Params[0].AsDate := Compet;
Open;
end;{ QryAux }
QryGera.Next;
until QryAux.RecordCount = 1
*-*-*-*-*-*-*-*
mas acho q no caso vc deveria usar o while...
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)