Subject | Re: [ib-support] Pls, help! What's wrong with this storedprocedure? |
---|---|
Author | Todd Brasseur |
Post date | 2002-05-11T15:54:55Z |
I don't see how your procedure returns anything. There is no 'suspend'.
Todd
Andrew Guts wrote:
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@egroups.com
>>
>>
>>
>>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@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>