I have a problem with a repetitive TADOTable
lookup by using the Locate
method. There's no problem when the following code executes for the first time, but any subsequent execution of it throws the Stack Overflow
exception.
procedure TForm14.Button1Click(Sender: TObject);
begin
ADOTable1.Open;
if not ADOTable1.Locate('Num-permis', Edit1.Text, []) then
ShowMessage(' Try it with another number, the figure does not exist');
end;
How can I fix this problem ?