I’m test to call Stored Procedure of Oracle from Hyperion Designer now.
I made SP without the parameter, and was able to display a result of dataset in Hyperion with Ref Cursor first. this is ok.
next, I made SP with one parameter, and write scripts.
ActiveDocument.Sections[“Query”].SetStoredProcParam(“test”,1);
ActiveDocument.Sections[“Query”].ProcessStoredProc();
but, I get error message…
error message: SQL API: [SQLExecDirectW], SQL RETURN: [-1], SQL STATE: [HY000], SQL NATIVE ERROR: [6550], SQL MESSAGE: [[DataDirect][ODBC Oracle Wire Protocol driver][Oracle]ORA-06550: line 1, column 8:
PLS-00306: wrong number or types of arguments in call to ‘TEST_PROC’
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored]
I thought through the night, but do not understand a cause.
Do you know a cause?
thank you,
– package
create or replace PACKAGE ICon_cur_pack
is
type status_cursor is ref cursor;
END ICon_cur_pack;
create or replace PROCEDURE TestAgentStatus002 (
testid IN varchar2
,status_cur OUT ICon_cur_pack.status_cursor
)
is
BEGIN
open status_cur for select * from gc_login where logincode = testid;
END;
this is ok code. I upset a parameter.
create or replace PROCEDURE TestAgentStatus003 (
status_cur OUT ICon_cur_pack.status_cursor,
testid IN number
)
is
BEGIN
dbms_output.put_line(testid);
open status_cur for select * from gc_login where id = testid;
END;
I did not understand causes well, but worked.
thank you.
The problem was that you were sending a integer parameter to a string variable:
SetStoredProcParam(“test”,1); where 1 is the parameter and as it doesn’t have quotes is considered an integer but in the SP the variable was declared as varchar.