You can use a function instead of a procedure, or you can pass the parameter by reference.
Delphi-Quellcode:
function TForm1.Person: integer;
begin
Result := <ID retrieved by
query>;
end;
procedure TForm1.Person(
out ID: integer);
begin
ID := <ID retrieved by
query>;
end;
If you want to
access the parameter inside the procedure, use "var" instead of "out".