Subject Stored Procedure half-Select half-Executable
Author hugosan@redysoft.com
Maybe this question is Interbase topic, but I try to solve it with
IBO.
I have a Stored Procedure that makes DML, it generates some inserts
in a table, depending on how many records it finds on a FOR SELECT...
For this reason, I would know which INSERTS it made, so I include
Output
Parameter that contains ORDER_NUMBER generated: now it's a Select-
Procedure
and it contains SUSPEND statement.
I know SUSPEND is not recommended for Select-Procedures, but I need
to show the multi-result of Procedure on a Grid wit multiple rows,
to allow the user printing individually the Orders.
I have many troubles with this approach: sometimes the Procedure
works and the grid shows several rows, and sometimes the grid is void.
By the way, within the C++Builder project I'm using a TIB_Query with
SELECT * FROM PROCEDURE_TAL(:INPUT_PARAMETER) to link its Dataset with
the TIB_Grid.
Has anyone any idea or advice?
TIA
Hugo.