I have a C library which should be called from a pl/sql function so I make a .so library and after that I create a pl/sql function to call it.
the C source(libcprog.c) is like this:
int exec_hmmftg ( char *p1 , char *p2, char *p3 ){}
the library in oracle database is:
CREATE LIBRARY CPROGLIB UNTRUSTED AS '/libcprog.so';
the created pl/sql function is:
CREATE OR REPLACE FUNCTION CALL_C_PROGRAM(P1 IN VARCHAR2,
P2 IN VARCHAR2,
P3 IN OUT VARCHAR2)
RETURN BINARY_INTEGER
IS EXTERNAL NAME "exec_hmmftg"
LIBRARY CPROGLIB
LANGUAGE C
PARAMETERS(P1 STRING, P2, P3 BY REFERENCE STRING, RETURN INT);
When I tried to call CALL_C_PROGRAM I catch:
ORA-01405: fetched column value is NULL
How can I know where is the problem?
New
I changed library definition to address somewhere wrong and I still catch the same exception!
Is there a parameter or something which I have to set before calling the function?
