Hi,
I am trying to invoke .dll from oracle 10g using trigger
first i created dll_test_func1 package as follows
Spec:
CREATE OR REPLACE PACKAGE dll_test_func1 AS FUNCTION FETCHID(ID in pls_integer)
RETURN PLS_INTEGER;
END dll_test_func1;
/
Body:
CREATE OR REPLACE PACKAGE body dll_test_func1 AS
FUNCTION FETCHID (ID in pls_integer)
RETURN PLS_INTEGER IS EXTERNAL LIBRARY dll_test
NAME "FEATCHDLL" -- name of function in kernel32.dll
LANGUAGE C -- external routine is written in C
CALLING STANDARD PASCAL
PARAMETERS -- map PL/SQL to C parameters by position
( ID BY REFERENCE int, RETURN int);
END dll_test_func1;
/
dll_test this is library i am created
CREATE OR REPLACE LIBRARY dll_test AS C:\CustomerSquareV3\CustomerSquareV3.dll' ;
and i also published my C#.net application .dll in same path
Following is the trigger that i created
CREATE OR REPLACE TRIGGER MNGH.CSQ7
AFTER INSERT
ON MNGH.INVDISMAIN ------------ table name
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
declare
ID number;
BEGIN
select dll_test_func1.FETCHID(:new.discode) into ID from dual;
INSERT INTO TEMP_TABLE (NAME) values (ID);
END;
when we are trying to make a bill in XYZ POS or manually in the database table i.e INVDISMAIN one row has to be inserted
but it is throwing an error and hence the values are not getting inserted.
ERRORS:
#18-DEC-2014 15:26:32# Application error : FRM-40508: ORACLE error: unable to INSERT record.
#18-DEC-2014 15:26:32# Database error : -6521: ORA-06521: PL/SQL: Error mapping function
ORA-06522: Unable to load symbol from DLL
ORA-06512: at "MNGH.CSQ7", line 4
ORA-04088: error during execution of trigger 'MNGH.CSQ7'
please help me out on this its very urgent.
Regards
----------
PraveenKumar
9886558537