Subject | Re: [ib-support] Pls, help! What's wrong with this stored procedure? |
---|---|
Author | Helen Borrie |
Post date | 2002-05-11T12:36Z |
At 01:39 PM 11-05-02 +0300, you wrote:
INSERT. Why do you think the insert fails? Are you perhaps trying to
inspect the table before the EXECUTE PROCEDURE call is committed?
Helen
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________
>Hi all. Could you please help me with this SP?If it returns the generator's value, and no error, then it performs the
>
>There is a table, where some texts are stored. I wrote SP to add a new
>record there.
>Why doesn't it insert a row to the table, but returns generator's value?
INSERT. Why do you think the insert fails? Are you perhaps trying to
inspect the table before the EXECUTE PROCEDURE call is committed?
Helen
>set term ^ ;All for Open and Open for All
>create procedure AddRepForm (NAME VARCHAR(80)) RETURNS (ID INTEGER)
>as
> DECLARE VARIABLE NewID integer;
>begin
> NewID = GEN_ID(G_RFORM_ID, 1);
> insert into RepForms (ID, Name) VALUES (:NewID, :Name);
> ID = NewID;
>end^
>set term ; ^
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________