Subject RE: [IBO] Urgent - Problem with StoredProc and prepare
Author Claudio Valderrama C.
> -----Original Message-----
> From: Paulo Henrique Albanez [mailto:pha@...]
> Sent: Martes 13 de Febrero de 2001 7:19
>
> Due the bug of InterBase, the best is?.
>
> Run prepare and unprepare always for stored procedure?
>
> or
>
> Used Select instead of Execute Procedure with suspend inside procedure?
>
> Example: Select * from ProcedureName(parametros, ...)
>
> PHA

The second option is better, because you:
- Will have to prepare once => better performance.
- You don't have to worry about receiving zero, one or more rows as the
result set. An IB_Cursor (non-buffered) or IB_Query (buffered) will work
anyway, depending on your needs. I you only need to traverse the results in
forward-only way, use the cursor, less overhead; otherwise, use the
IB_Query. Procedure components are designed to receive only one row.
- Your procedure can be invoked (using SELECT) from several tools that
aren't prepared to get results from EXECUTE applied to a procedure.

C.