Subject Re: [firebird-support] need help - can't re-create stored procedure...
Author Rui Francisco
Hi,

I think you can't have the parameter user_id in input and on the output
with the same name.

Can you please test for instance with a diferent name

Rui Francisco



zamb1zz1 wrote:

>
>I created a stored procedure, then I came back later to alter it and I
>an error every time. Logging out completely and even rebooting
>haven't fixed it, I have no idea what to do.
>
>Here's the error & stored procedure:
>
>ISC ERROR CODE:335544351
>
>ISC ERROR MESSAGE:
>unsuccessful metadata update
>STORE RDB$PROCEDURE_PARAMETERS failed
>attempt to store duplicate value (visible to active transactions) in
>unique index "RDB$INDEX_18"
>
>Statement: create procedure "sel_active_order_by_customer_id"
>(
> "user_id" varchar(50)
>)
>returns
>(
> "order_id" int,
> "user_id" varchar(50),
> "invoice_id" varchar(50),
> "order_date" date,
> "ship_date" date,
> "order_status" varchar(50),
> "payment_status" varchar(50),
> "shipping_amt" decimal,
> "tax_amt" decimal,
> "order_amt" decimal,
> "payment_message" varchar(100),
> "avs_code" varchar(50),
> "is_active" char(1)
>)
>as
>declare variable "_order_id" int;
>declare variable "_user_id" varchar(50);
>declare variable "_invoice_id" varchar(50);
>declare variable "_order_date" date;
>declare variable "_ship_date" date;
>declare variable "_order_status" varchar(50);
>declare variable "_payment_status" varchar(50);
>declare variable "_shipping_amt" decimal;
>declare variable "_tax_amt" decimal;
>declare variable "_order_amt" decimal;
>declare variable "_payment_message" varchar(100);
>declare variable "_avs_code" varchar(50);
>declare variable "_is_active" char(1);
>begin
> for
> select
> "order_id",
> "user_id",
> "invoice_id",
> "order_date",
> "ship_date",
> "order_status",
> "payment_status",
> "shipping_amt",
> "tax_amt",
> "order_amt",
> "payment_message",
> "avs_code",
> "is_active"
> from
> "order"
> where
> "is_active" = 'Y'
> and
> "user_id" = :"user_id"
> into
> :"_order_id",
> :"_user_id",
> :"_invoice_id",
> :"_order_date",
> :"_ship_date",
> :"_order_status",
> :"_payment_status",
> :"_shipping_amt",
> :"_tax_amt",
> :"_order_amt",
> :"_payment_message",
> :"_avs_code",
> :"_is_active"
> do
> suspend;
>end
>
>
>
>
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>


--
Rui Francisco - rui.francisco@...
FCCN - Fundação para a Computação Científica Nacional
Av. Brasil, 101 1700-066 Lisboa - Portugal
Tel: +351 218440100 Fax: +351 218472167
-----------------------------------------------------