Challenge of Day

Monday, December 22, 2008

ORDCOM Functions Returns 0x80004005

Hello,
In the journey of calling a COM+ component from within Oracle PL/SQL using ORDCOM package, I noticed that return value of functions is -2147467259. Here is the code snippet to see the error number:
In SQLPlus, type this command:
SQL>set serveroutput on;
In your stored procedure:

CREATE OR REPLACE PROCEDURE CALL_MY_COM IS
HRESULT BINARY_INTEGER;
ApplicationHandle BINARY_INTEGER;
BEGIN
HRESULT =:=ORDCOM.CREATEOBJECT('MY_COM_OBJ',0,'',ApplicationHandle);
if (HRESULT !=0) THEN
DBMS_OUTPUT.PUT_LINE(HRESULT);
END IF;
HRESULT := ORDCOM.INVOKE(ApplicationHandle, 'method_name');
END;

The error number -2147467259 which is equal to 0x80004005 means that you are lacking of DCOM security privilages. I have an extended document showing how to use DCOMCNFG.EXE to resolve this problem. To find out more, go to: http://www.khademi.com/document/docs.htm

Be a winner in your daily challenges
Ali Khademi

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home