Subject | Re: Pls, help! What's wrong with this storedprocedure? |
---|---|
Author | csswa |
Post date | 2002-05-11T16:19:55Z |
It's an EXECUTE procedure, not a SELECT procedure.
SUSPEND is for SELECT procedures only -- not recommended putting
SUSPEND in an EXECUTE procedure. See page 153 of data definition
guide for more.
Regards,
Andrew Ferguson
-- ERROR 404 - Slogan not found
SUSPEND is for SELECT procedures only -- not recommended putting
SUSPEND in an EXECUTE procedure. See page 153 of data definition
guide for more.
Regards,
Andrew Ferguson
-- ERROR 404 - Slogan not found
--- In ib-support@y..., Todd Brasseur <todd.compass@s...> wrote:
> I don't see how your procedure returns anything. There is
no 'suspend'.
>
>
> Todd
>
>
> Andrew Guts wrote:
>
> >
> >Helen Borrie wrote:
> >
> >>At 01:39 PM 11-05-02 +0300, you wrote:
> >>
> >>>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?
> >>
> >
> >Because new record don't appear.
> >
> >>Are you perhaps trying to
> >>inspect the table before the EXECUTE PROCEDURE call is committed?
> >>
> >
> >I've tried to run it from IBConsole:
> >
> > 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@e...
> >>
> >>
> >>
> >>Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >>
> >
> >
> >
> >To unsubscribe from this group, send an email to:
> >ib-support-unsubscribe@e...
> >
> >
> >
> >Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >