Subject Re: [IBO] Stored procedure, ExecSQL and Suspend
Author Svein Erling Tysvaer
Hi Marco!

At 16:01 02.11.2002 +0000, you wrote:
>My rule was:
>Stored procedure that returns (potentially) multiple rows (selectable
>stored procedure):
>IBO: call them with a select inside IB_Query or IB_Cursor
>SP: add a SUSPEND at the end of the code that provides each data row
>
>Stored procedure that returns only return variables:
>IBO: call them with a ExecSQL inside a IB_StoredProc
>SP: SUSPEND is to be avoided (see Firebird documentation)

Sounds sensible to me.

>But now seems that something like:
>
>CREATE PROCEDURE GET_CONTO_DIFFERENZIA_GR (

<skipped a lot>

> IF ((OUT_DIFFERENZIA='E') OR (OUT_DIFFERENZIA IS NULL)) THEN
> OUT_DIFFERENZIA='N';
> SUSPEND; /* ****************************** */
>END
>
>Needs the final suspend...

Are you sure? I would have thought EXIT would have been more appropriate.

>The question is:
>What component must I use in IBO for retrieving output values from this
>kind of SP? What method do I have to call (i.e. ExecSQL, Open...)?

I'll leave this for others to answer - I do not use SPs enough to be aware
of any pitfalls.

Set