Subject Re: [firebird-support] Corupting fields from simple SP
Author Lucas Franzen
Tim,


CREATE PROCEDURE SP_SET_DISC_DELIVERED (
SRFID CHAR(16),
STATUS VARCHAR(10)
)
AS
DECLARE VARIABLE IRFID_V INTEGER;
DECLARE VARIABLE TRANSACTION_ROW_CONTENT_ID_V INTEGER;
DECLARE VARIABLE DELIVERED_DATE_V TIMESTAMP;
begin
select irfid from t_products_rfid
where rfid = :srfid into :irfid_v ;

select first 1 TRANSACTION_ROW_CONTENT_ID from
t_transaction_row_content trc where :irfid_v=irfid

where irfid = :irfid_v

> order by transaction_row_id desc into :transaction_row_content_id_v;
>
> if (:STATUS = 'DELIVERED') then

if (STATUS = 'DELIVERED') then

> delivered_date_v='NOW'; else delivered_date_v=null;

>
> I have been banging my head against this problem for many hours now
> and any ideas would be much apreciated because I am stomped. I have
> tried to recreate the DB from nothing to be sure that there are no
> eroneous initial data but no success there.

Any triggers on your table?

Luc.