Iam getting error message “Invalid Cursor Number Cursor context not found” when calling the oracle stored procedure .
If i pass only one paramter (any one) from the webMethods the stored procedure works fine, but when i pass more than one paramter value it throws the Exception "Invaid Cursor Number ".
Hi Shibu,
I am not sure if I get your problem correct or not…
but may be this solution will work for you. You may be already knowing this case and your problem is advanced than below.
When calling Oracle stored procedure from webMethods Enterprise Server, you have to define a cursor type in package specification like following:
(pls note I am using ! instead of angled brackets to signify name to be replaced)
CREATE OR REPLACE PACKAGE !pkgName! IS
Type !recordTypeName! is record
(
outField1 !fielddatatype!,
outField2 !fielddatatype!
– and so on…
);
TYPE !RefCursorType! IS REF CURSOR RETURN !recordTypeName!;
procedure !myProc!( out_cursor in out !RefCurType!
, inField1 in !fielddatatype!
, inField2 in !fielddatatype!
– and so on
);
END;
/
And in the stored procedure you have to send output data as
open out_cursor for
select !outfield1!, !outfield2!, !outfield3! – and so on
from dual;
There can be only one out put field and that is the ref cursor passed in the very first parameter.
Thanks for your valuable suggestion, My strored proc works fine with Orcale 8.1.5 , 8.1.7.
The problem is when i call the proc from Orcale 8.1.7.4 and if i pass more than one input value the adpater throws the exception “Invalid Cursor number”. The same stored proc works fine from SQL Plus
If i pass only one input parameter the stored proc works fine even with Oracle 8.1.7.4…