Subject Re: [firebird-support] Simple stored procedure won't work
Author Agibov Dmitry
Hi!

Put 'Suspend' statement at the end of your procedure like this:

create or alter procedure sel_product_by_product_id
(
product_id int
)
returns
(
product_id_ int,
product_name_ varchar(50),
product_num_ varchar(50),
synopsis_ varchar(500),
description_ varchar(1000),
wholesale_price_ decimal(9, 2),
unit_price_ decimal(9, 2),
sale_price_ decimal(9, 2),
weight_ decimal(9, 2),
height_ decimal(9, 2),
width_ decimal(9, 2),
length_sz_ decimal(9, 2),
insured_value_ decimal(9, 2),
is_free_shipping_ char,
shipping_amt_ decimal(9, 2),
is_cross_sell_ char,
thumbnail_ varchar(100),
photo_ varchar(100)
)
AS
begin
select
product_id,
product_name,
product_num,
description,
synopsis,
wholesale_price,
unit_price,
sale_price,
weight,
height,
width,
length_sz,
insured_value,
is_free_shipping,
shipping_amt,
is_cross_sell,
thumbnail,
photo
from
product
where
product_id = :product_id
into
:product_id_,
:product_name_,
:product_num_,
:synopsis_,
:description_,
:wholesale_price_,
:unit_price_,
:sale_price_,
:weight_,
:height_,
:width_,
:length_sz_,
:insured_value_,
:is_free_shipping_,
:shipping_amt_,
:is_cross_sell_,
:thumbnail_,
:photo_;

SUSPEND;
end
^

Its must work ..