Subject | Re: [ib-support] Pls, help! What's wrong with this storedprocedure? |
---|---|
Author | Andrew Guts |
Post date | 2002-05-11T12:57:59Z |
Helen Borrie wrote:
EXECUTE PROCEDURE AddRepForm 'New form';
And pressed [Commit] button manually.
Any errors and any new records. Only ID as result.
The same when using TStoredProc from Delphi app.
> At 01:39 PM 11-05-02 +0300, you wrote:Because new record don't appear.
> >Hi all. Could you please help me with this SP?
> >
> >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?
>
> If it returns the generator's value, and no error, then it performs the
> INSERT. Why do you think the insert fails?
> Are you perhaps trying toI've tried to run it from IBConsole:
> inspect the table before the EXECUTE PROCEDURE call is committed?
EXECUTE PROCEDURE AddRepForm 'New form';
And pressed [Commit] button manually.
Any errors and any new records. Only ID as result.
The same when using TStoredProc from Delphi app.
>
>
> Helen
>
> >set term ^ ;
> >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 ; ^
>
> All for Open and Open for All
> Firebird Open SQL Database · http://firebirdsql.org ·
> http://users.tpg.com.au/helebor/
> _______________________________________________________
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/