Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
CAPI.ExecSP doesn't work for ORACLE
Dylan_Wright_(xisdylan_-_(deleted))
I have a stored procedure in Oracle cyc_check and i am unable to execute it succefully. Is there any detailed documentation on CAPI.ExecSP please help.The call to the stored procedure is as followsCAPI.ExecSP(connection,"cyc_check(18697.2,18694.1)")The log of the data access layer is as follows0000000430: Oracle error: (0) --> ORA-00900: invalid SQL statement0000000431: KSqlCursor::Open(2000,'cyc_check(18697.2,18694.1)') -->'Could not prepare cursor.'
Find more posts tagged with
Comments
eLink User
Solution offered by Aditya Metukul,AMAT,ITPL, Bangalore-----------------------------------------------------------------CAPI.EXEC(SELECT ora_package.func_name( input_values ) FROM DUAL)eg:CAPI.EXEC(SELECT emp_data.delemp(5) FROM DUAL);So to make the above function delemp eligible for performing dml operations we have to make it Autonomous trasaction.below example is exhibiting autonomous transaction----------------------------------------------------------CREATE OR REPLACE PACKAGE emp_data ASFUNCTION delemp(emp_id IN EMPLOYEE.empno%TYPE) return varchar2;END emp_data;CREATE OR REPLACE PACKAGE BODY emp_data ASFUNCTION delemp(emp_id IN EMPLOYEE.empno%TYPE) RETURN VARCHAR2 IS -- The procedure deletes the employee with an employee-- number that corresponds to the argument EMP_ID. If-- no employee is found, an exception is raised. PRAGMA AUTONOMOUS_TRANSACTION;BEGINDELETE FROM EMPLOYEE WHERE empno = emp_id;commit;RETURN emp_id;END delemp;END emp_data;