Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

CLIENT_OLE2.INVOKE_NUM WITH IN OUT PARAMETER

ashoshehJan 7 2009 — edited Oct 6 2010
Hi all,
I'm using oracle 10g forms to call out an OCX file. I'm successful in calling the OCX but not in retrieving the output parameters from the ocx function.

Example function inside the ocx file:

function getNextNumber(PNum OUT String , statusString OUT String, statusCode OUT String) return Number

The function returns 0 if the execution is successful. I'm successflul in calling this function and hence getting the value "0" after execution but i'm not able to retrieve the OUTPUT values from the function.

SQL CODE:
----------------------
DECLARE
IFAOBJ CLIENT_OLE2.OBJ_TYPE;
args CLIENT_OLE2.LIST_TYPE;
StatusVal VARCHAR2(4000) := '0';
PersonNumber VARCHAR2(4000) := '0';
StatusStr VARCHAR2(4000) := '0';
I NUMBER;
BEGIN

IFAOBJ := CLIENT_OLE2.CREATE_OBJ('IFA_API_NG.clsIFA_API_NG');

args := CLIENT_OLE2.CREATE_ARGLIST;

CLIENT_OLE2.ADD_ARG(args, PersonNumber);
CLIENT_OLE2.ADD_ARG(args, StatusStr);
CLIENT_OLE2.ADD_ARG(args, StatusVal);

I := CLIENT_OLE2.INVOKE_NUM(IFAOBJ,'IFA_GetNextPersonNumber',args);

message('I='||I);message('I='||I);

--PersonNumber := CLIENT_OLE2.GET_CHAR_PROPERTY(args,'PERSONNUMBER');

CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.RELEASE_OBJ(IFAOBJ);

EXCEPTION
WHEN CLIENT_OLE2.OLE_ERROR THEN
statusVal := CLIENT_OLE2.LAST_EXCEPTION(statusStr);
MESSAGE('FATAL... '||statusStr);
MESSAGE('FATAL... '||statusStr);
CLIENT_OLE2.RELEASE_OBJ(IFAOBJ);
WHEN OTHERS THEN
MESSAGE(SQLERRM);
MESSAGE(SQLERRM);
CLIENT_OLE2.RELEASE_OBJ(IFAOBJ);
END;

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 3 2010
Added on Jan 7 2009
1 comment
686 views