The standard Delphi help (and most other languages) use First, Next, and EOF (End of File) to step through all the records in a dataset.
Unfortunately, EOF does not appear to work with KADao.
Example
with Some_Table do begin
try
Find_First('Purpose',Purpose,[loCaseInsensitive]);
while not Eof do begin // This fails to exit
// Something useful goes here
Find_Next('Purpose',Purpose,[loCaseInsensitive]);
end;
finally
end;
end; // with
This code works
procedure TAliases_DataModule.SetAliases(Purpose : string);
var
xx : boolean ;
begin
with Alias_Details_tbl do begin
try
xx := Find_First('Purpose',Purpose,[loCaseInsensitive]);
while xx do begin
xx := Find_Next('Purpose',Purpose,[loCaseInsensitive]);
end;
finally
end;
end; // with
end;
Related Info