Subject Re: [IBO] Executing a procedure
Author Daniel Rail
Hi,

At December 8, 2004, 13:03, yaedos2000 wrote:



> Hi, I'm using a selectable stored procedure to obtain a list of ID
> numbers as follows:

> SET TERM ^ ;

> CREATE PROCEDURE TEST
> RETURNS (
> ID_NUM VARCHAR(15))
> AS
> begin
> /* Procedure Text */
> SELECT HACID FROM TBL_HACS INTO :id_num;
> suspend;
> end
> ^

> SET TERM ; ^

> Which IB component should I use to execute this procedure, and how do
> I store the returned results into variables in Delphi 7?

First, your stored procedure should look like:

SET TERM ^ ;

CREATE PROCEDURE TEST
RETURNS (
ID_NUM VARCHAR(15))
AS
begin
/* Procedure Text */
FOR SELECT HACID FROM TBL_HACS INTO :id_num DO
suspend;
end
^

SET TERM ; ^


And, then you can use any IBO query component and enter the following
as the query:

SELECT ID_NUM FROM TEST

That's all you have to do.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)