Subject | Re: [IBO] Returning value from SP |
---|---|
Author | Helen Borrie |
Post date | 2004-03-29T00:12:54Z |
At 04:09 PM 28/03/2004 -0700, you wrote:
suspend if you're going to use a SELECT to get this (for now: according to
the information I have, it's a bug (not an IBO one - it's reproducible with
isql) so I'll have change some things in the book to document it :-(*
But, as an IBO user, *don't* use a SELECT procedure (TIBOQuery, TIB_Query)
for this kind of operation - it's too costly. Make the procedure an
executable one (no suspend!!) and use a TIB_DSQL or a TIB_Cursor for
it. Call Execute and read Fields to get the result.
cheers,
Helen
>Via IBWISQL I createdYes, I confirm that you are correct in this observation...so stick with
>
>Create procedure SingleLine
>Returns (a integer)
>as
>begin
>a = 1;
>end
>
>and executed 'select * from SingleLine' and received nothing.
>
>then changed it to
>
>Alter procedure SingleLine
>Returns (a integer)
>as
>begin
>a = 1;
>Suspend;
>end
>
>and received one row with the value 1.
>
>I obtained the same results using a TIBOQuery.
suspend if you're going to use a SELECT to get this (for now: according to
the information I have, it's a bug (not an IBO one - it's reproducible with
isql) so I'll have change some things in the book to document it :-(*
But, as an IBO user, *don't* use a SELECT procedure (TIBOQuery, TIB_Query)
for this kind of operation - it's too costly. Make the procedure an
executable one (no suspend!!) and use a TIB_DSQL or a TIB_Cursor for
it. Call Execute and read Fields to get the result.
cheers,
Helen