IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Stored Procs in Oracle Adapter

  • 1.  Stored Procs in Oracle Adapter

    Posted Tue July 02, 2002 05:52 PM

    Can someone tell me how to run stored procs in Oracle adapter and get a output from it.I am trying to open a Ref Cursor and passing Input values to the stored Proc.My stored Proc is in Package also.It gives me a error saying ORA-01023: Cursor context not found (Invalid cursor number).I am opening the cursor too.If someone knows Please let me know.

    Thanks
    Puneet


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Stored Procs in Oracle Adapter

    Posted Thu July 11, 2002 10:31 AM

    Puneet

    The following procedure works with orcale Adapter

    reate or replace package packemp as
    Status varchar2(100);
    cursor empcursor is select Status from Dual;
    Type type_Cursor is ref cursor return empcursor%rowtype;
    procedure empinsert
    (out_cursor in out type_cursor,
    empno number,
    name varchar2);
    end packemp;
    /

    create or replace package body packemp as
    procedure empinsert
    (out_cursor in out type_cursor,
    empno number,
    name varchar2) is

    Begin
    BEGIN
    insert into emp1 values(empno,name);
    Status:=‘Done’;

    	Exception
    When others then
    Status:=SQLERRM;
    END;
    
    
    Open out_cursor for Select Status from dual;
    

    END EMPINSERT;
    end packemp;


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods