Subject | Re: [firebird-support] Returning a value from a Stored Procedure |
---|---|
Author | Tim |
Post date | 2006-05-19T09:19:21Z |
>Wonderful!
>You can't do this in a reliable way.
>
>Do it differently. Change your trigger to:
>
>if ( (new.recordno is null) or (new.recordno = 0) )
>then new.recordno = gen_id(gen_1, 1);
>
>Now, in your procedure do:
>
>recordno = gen_id(gen_1, 1);
>insert into table1 (recordno, fieldone)
>values :recordno, :field1;
Thanks Martijn!