Subject | Re: [IBO] How to correctly call a Remote Procedure with IB_CURSOR or IB_QUERY |
---|---|
Author | Helen Borrie |
Post date | 2004-01-08T23:56:31Z |
At 05:44 PM 8/01/2004 -0600, you wrote:
You probably need to show us the body of the SP. A specific structure is
required to return a multi-row set from a SP, viz. FOR
SELECT...INTO...DO...SUSPEND
If this is correct, the way to invoke it via a dataset is to use the SQL:
SELECT
OUT_CLASS_ID, OUT_SECTION, OUT_CLASS, OUT_GRADE_LEVEL
FROM EMP_CLASS_LIST (:IN_EMPLOYEE_ID)
For an ib_cursor, check that it is prepared, supply the input parameter,
and call First.
For an ib_query, check that it is prepared, supply the input parameter, and
call Open.
To make it updatable, you will have to supply xxxxSQL properties.
Helen
>I have created a stored procedure that passing an Employee ID, will do theChristopher,
>needed work in the stored procedure to return a result set of classes
>taken information along with other items not shown in example. I have
>completed, and tested in IB_Manager so I know it works.
>
>In IB_Cursor I tried doing a SELECT * FROM EMP_CLASS_LIST to invoke the
>procedure, but I do not understand, and need some examples how to set up
>the parameter passing.
>
>
>Header from the Remote Procedure:
>CREATE PROCEDURE EMP_CLASS_LIST (
> IN_EMPLOYEE_ID VARCHAR (10))
>RETURNS (
> OUT_CLASS_ID VARCHAR (10),
> OUT_SECTION VARCHAR (6),
> OUT_CLASS_DESC VARCHAR (60),
> OUT_GRADE_LEVEL VARCHAR (2),
>
>--
>Sent by: Christopher Hart, cjh@... on 1/8/2004 5:41:11 PM
You probably need to show us the body of the SP. A specific structure is
required to return a multi-row set from a SP, viz. FOR
SELECT...INTO...DO...SUSPEND
If this is correct, the way to invoke it via a dataset is to use the SQL:
SELECT
OUT_CLASS_ID, OUT_SECTION, OUT_CLASS, OUT_GRADE_LEVEL
FROM EMP_CLASS_LIST (:IN_EMPLOYEE_ID)
For an ib_cursor, check that it is prepared, supply the input parameter,
and call First.
For an ib_query, check that it is prepared, supply the input parameter, and
call Open.
To make it updatable, you will have to supply xxxxSQL properties.
Helen