Subject Passing input arguments with TIB_Query
Author yaedos2000
Hi,

I'm using a stored procedure as follows which takes one input
variable and returns two output variables:

CREATE PROCEDURE SP_SELECT_ID(
IN_TID INTEGER)
RETURNS (
OUT_ID INTEGER,
OUT_TID INTEGER)
AS
begin
FOR SELECT ID, TID FROM TABLE_1 WHERE TID = :IN_TID
INTO :OUT_ID, :OUT_TID DO
suspend;
end
^

I'm using a TIB_Query statement to select the required data:

SELECT OUT_ID, OUT_TID FROM SP_SELECT_ID(IN_TID);

How do you get the TIB_Query component to pass in the input variable?
I'm currently using:

tid := 5;
id := query(tid).FieldByName('OUT_ID').AsString;

but this isn't working, presumably due to incorrect syntax somewhere.
What is the correct method of passing an input variable into this
procedure?