Repeat.
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
Curtidas 0
Respostas
Osocram
20/10/2003
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...
GOSTEI 0