[SOLVED] Calling Oracle Stored Procedure
Author: kevin_darbin@hargreaveslansdown.co.uk (kevindarbin)
Hello, I'm trying to call a Stored Procedure in Oracle using a Stored Procedure Component, and am getting an error. The following should describe the steps that I have taken:- - Created a Signature called "SP_GENERATE_SEQUENCE" as a Stored Procedure Component and marked the component as "Stateless" - Created an Operation in the Signature called "SP_GENERATE_SEQUENCE", with an in parameter called "SEQUENCE_NAME" of type string, and an out parameter called "SEQUENCE_NUMBER" of type numeric - Created an entry in the [SERVICES_EXEC] of my asn file which is "SP_GENERATE_SEQUENCE $UD3:SP_GENERATE_SEQUENCE". $UD3 points to my Oracle database, and logs into the schema containing the Stored Procedure - The call I am making in Uniface is: activate "SP_GENERATE_SEQUENCE".SP_GENERATE_SEQUENCE("ID_ADOBE_ERROR_ID_SEQ", v_sequence) When the above is executed, I get the following Oracle error: ICCDRV-ORA-ERR Call ICC component failed, ORA-06550: line 1, column 28: PLS-00225: subprogram or cursor 'SP_GENERATE_SEQUENCE' reference is out of scope ORA-06550: line 1, column 7: PL/SQL: Statement ignored And just to complete the information, the SQL to generate the Stored Procedure is: create or replace PROCEDURE sp_generate_sequence (i_sequence_name IN VARCHAR2, o_sequence_number OUT NUMBER) AS v_sql_statement VARCHAR2(1000); BEGIN v_sql_statement := 'select ' || i_sequence_name ||'.NEXTVAL from dual'; EXECUTE IMMEDIATE v_sql_statement INTO o_sequence_number; END; I haven't tried to do this before, so there is a chance that I have missed something out somewhere. Any help given would be much appreciated. Thanks, Kevin