Subject AW: [firebird-support] Re: transaction the hundreth
Author Olaf Kluge
>
> I think, despite that the stored procedure inserts all data in one
> transaction, the trigger runs before the other records were inserted.
>
>
>
> Or think I'm wrong?
>
>
Hello Olaf

Are you using the very nice single step debug feature of IBExpert? As far as
I know, IBExpert has to use some tricks to do step by step debugging, and
there may be some side effects.

I had once some problems when singel stepping in a procedure. Try to call
the procedure from an other procedure and step over the procedure under
test.

Good luck

Christian

---

Thanks, but with flamerobin the same result.



Here the inserting procedure:



BEGIN

select str_out from p_u_format_date('now','yyyy-mm-dd hh:nn:ss') into
:strdat;

TABLE A: (IN THIS TABLE THE TRIGGER RUNS A STORED PROCEDURE TO PROCESS DATA
AFTER INSERT

)

insert into idoc(lineid, idoctypid, state, errorcode, source, destination,
dtimecre) values

('0500000005', '0000000012', '0000000010', '0000000000', '0000000001',
'0000000002',

:strdat) returning lineid into :io;

insert into h2orderm(idocid, modcnt, datacode, bookctrl, corderid,
corderty, cprio, cwsid, dtimecre)

values (:io, '0000000000', '10', '10', 'BNR334 ', 'E ', '5',
'1 ', :strdat) ;

insert into h2orderd(idocid, modcnt, datacode, corderid, corderty,
corderln, cpartid,

cqnominal, cbu, clotid, cspecinvid, corderinfo1) values

(:io, '0000000000', '20', 'BNR334 ', 'E ', '0001', 'EinTeil
', '00000100388',

'KG ', 'Charge1 ', 'SpezialNR1 ', 'infoinfo
');

insert into h2orderd(idocid, modcnt, datacode, corderid, corderty,
corderln, cpartid,

cqnominal, cbu, clotid, cspecinvid, corderinfo1) values

(:io, '0000000000', '20', 'BNR334 ', 'E ', '0002', 'Bernd
', '00000100389',

'KG ', 'Charge2 ', 'SpezialNR2 ', 'info111infoiii
');

-- update idoc set errorcode = '0000000000' where lineid = :io;

END



This works wrong! The Trigger runs at the moment if there is no record in
h2orderm and h2orderd yet.



If I set the errorcode to 50 (parking) and uncomment the last line to update
the set the errorcode to 0, it works.



What can be wrong? This stored procedure is called by ibexpert or flamerobin
and commit, but it works not.



Thanks for helping.



Olaf



[Non-text portions of this message have been removed]