Subject | Re: [ib-support] using Gen_id from a stored proc |
---|---|
Author | Paul Reeves |
Post date | 2001-03-21T19:23:43Z |
Rhett Guthrie wrote:
fine. The Select statement doesn't because it needs a suspend. So, next
question, how and where are you testing this?
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further
>I took your code and executed it in ISQL. The Execute procedure statement works
> I am trying to write a simple stored proc that returns the results of
> running Gen_Id. I am trying to use this code:
>
> Create Procedure GeneratePrimaryKey
> Returns ("PK" Integer )
> As Begin
> "PK" = Gen_Id( PrimaryKeyGenerator, 1 );
> End !!
> Set Term ; !!
>
> I execute this code using both of these:
>
> Execute Procedure GeneratePrimaryKey
> Select PK From GeneratePrimaryKey
>
> However, though the PrimarykeyGenerator value is being incremented with
> both approaches, neither of these approaches are actually returning the
> generated value. I get back a table with one column and no data.
>
fine. The Select statement doesn't because it needs a suspend. So, next
question, how and where are you testing this?
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further