Posted: Mon Nov 24, 2003 9:06 am Post subject: How the REF CURSOR parameter can be passed to a Oracle SP?
Newbie
Joined: 24 Jan 2002 Posts: 6 Location: AXA IM
PROCEDURE open_emp_cv (emp_cv IN OUT types.EmpCurTyp) AS
BEGIN
OPEN emp_cv FOR SELECT * FROM emp;
END open_emp_cv;
The types is defined in a package:
PACKAGE types AS
TYPE EmpCurTyp IS REF CURSOR RETURN emp%ROWTYPE;
END types;
The stored procedure works fine under sqlplus. But I cannot make it works from a WMQI compute node. The eSQL command I tried:
SET InputDestinationList.XML.TempData."DeptName"[] = PASSTHRU('{call open_emp_cv()}');
.....
The error message is: [MERANT][ODBC Oracle 8 driver][Oracle 8]ORA-06550: line 1, column 8:
PLS-00306: wrong number or types of arguments in call to 'OPEN_EMP_CV_LYNN'
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored
The error message shows that the Stored Procedure expects a cursor parameter. But I don't know how to pass the cursor variable to the stored procedure through the PASSTHRU command.
Has anyone managed to pass REF CURSOR type to an Oracle stored procedure through the wmqi compute node?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum