CLIENT_OLE2.INVOKE_NUM WITH IN OUT PARAMETER
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;