title: How to retrieve output variable from Firebird
body: <p>I have a free pascal application using Firebird. How can I retrieve the output variable from this Firebird stored procedure:</p>
  
  <pre><code>input parameters: ID (integer)
  output parameters: G (integer)
  
  begin
   if(select town.count from town where town.id=:id) then
      G = 100
   else
      G = 200;
    suspend;
  end
  
  in designer-&gt;SQL 
  EXECUTE PROCEDURE ID_DEV :ID RETURNING_VALUES :G
  </code></pre>
  
  <p>In code:</p>
  
  <pre><code>SQLQueryProc.Prepare; //here i got an error
  SQLQueryProc.ParamByName('ID').Value:=res;
  SQLQueryProc.ExecSQL();
  SQLTransaction.CommitRetaining;
  ID:=SQLQueryProc.FieldByName('G').AsInteger;
  </code></pre>
  
  <p>When I run my app I get an error: </p>
  
  <blockquote>
    <p>Token unknown line (where :G located)</p>
  </blockquote>
  
  <p>I have tried many combinations. What is the reason?</p>