Why i can't use first parameter of TOraStoredProc like all other parameters, when then they are cursors?
Posted: Tue 19 Jan 2010 06:40
Hi!
Look, i have some stored procedure in my database:
When I tried to get second cursor like this:
Its all OK.
But when I tried to get first cursor:
I have no data in a MyOraQuery!
Only this works:
But why?
I tried with a different params but any time when i have cursor in them its doesnt not works with first cursor of params, all other cursors works fine.
Thanks!
Look, i have some stored procedure in my database:
Code: Select all
PACKAGE BODY pkg_Test AS
PROCEDURE TestProc(
aMessage OUT VARCHAR2,
aCursor1 OUT SYS_REFCURSOR,
aCursor2 OUT SYS_REFCURSOR
) IS
BEGIN
aMessage := 'Hello';
OPEN aCursor1 FOR
SELECT 'First Cursor'
FROM Dual;
OPEN aCursor2 FOR
SELECT 'Second Cursor'
FROM Dual;
END;
END;Code: Select all
MyOraQuery.Cursor := MyOraStoredProc.Params[2].AsCursor;
MyOraQuery.Open;But when I tried to get first cursor:
Code: Select all
MyOraQuery.Cursor := MyOraStoredProc.Params[1].AsCursor;
MyOraQuery.Open;Only this works:
Code: Select all
MyOraQuery.Assign(MyOraStoredProc);
MyOraQuery.Open;I tried with a different params but any time when i have cursor in them its doesnt not works with first cursor of params, all other cursors works fine.
Thanks!