Subject Re: [firebird-support] Procedure parameter mismatch
Author Nick Upson
Execute procedure GET_SACS_BY_NO :UQSACSNO;

should be

Execute procedure GET_SACS_BY_NO (UQSACSNO) returning ...;

On 03/04/07, nols_smit <nols@...> wrote:
> Hi,
>
> I'm using FB 1.5.3.4870
>
> When I try to compile the procedure code (displayed below), I get the
> following error message (caused by the Execute statement):
>
> fmCompile.trCompile:
> Invalid token.invalid request BLR at offset 454.
> parameter mismatch for procedure GET_SACS_BY_NO.
>
> Any ideas what's wrong?
>
> Regards,
>
> Nols Smit
>
> /* ------------- procedure code ---------------- */
> CREATE PROCEDURE GET_SACS_BY_NO (
> PSACSNO INTEGER)
> RETURNS (
> ID INTEGER,
> UQSACSNO INTEGER,
> LITHONAME CHAR (60) CHARACTER SET WIN1252,
> LITHORANK CHAR (5) CHARACTER SET WIN1252)
> AS
> declare variable SACSNO integer;
> declare variable CNT integer;
> BEGIN
> /* Procedure body */
> Select UQ_Sacs_No from V_Sacs where Parent_UQ_Sacs_No = :PSACSNO
> into :SACSNO;
>
> Select count(UQ_Sacs_No) from V_Sacs where
> Parent_UQ_Sacs_No = :PSACSNO into :CNT;
>
> if (cnt = 0) then
> suspend;
>
>
> For Select ID, UQ_Sacs_No, Litho_Name, Litho_Rank_Abbr from V_Sacs
> where
> Parent_UQ_Sacs_No = :PSACSNO
> into :ID, :UQSACSNO, :LITHONAME, :LITHORANK
> do
> begin
> Execute procedure GET_SACS_BY_NO :UQSACSNO;
> end
>
> SUSPEND;
> END
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://www.firebirdsql.org and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>