Subject | Re: [firebird-support] Returning a value from a Stored Procedure |
---|---|
Author | Tim |
Post date | 2006-05-19T09:35:13Z |
>One more question :
>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;
I presume I would get this value (in Delphi) by using something like
SELECT RECORDNO FROM MYPROCEDURE(VALUE)
?
TIA
Tim