Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Oracle 8.0.4 external procedure error
I wrote a c function and built a dll for winnt env.
I was trying to call it from PL/SQL.
I was getting the ORA-6521,6522, 6512 errors. Can anyone see where the
problem is??
Here is the c program and built it as fasextproc1.dll. I have a defined library to point it to the full path of the dll.
__declspec(dllexport) int fngreater(int x, int y)
{
int answer;
if ( x> y ) answer = x;
else answer = y;
return answer;
}
Here is how I wrote for the PL/SQL register proc and calling proc.
Rem
Rem
CREATE OR REPLACE FUNCTION fngreater( x IN BINARY_INTEGER , y IN
BINARY_INTEGER )
RETURN BINARY_INTEGER AS EXTERNAL
LIBRARY faslib
NAME "fngreater"
LANGUAGE C
PARAMETERS ( x int, y int, return int);
/
show errors
set serveroutput on size 30000
declare
mynum BINARY_INTEGER;
myx BINARY_INTEGER := 1;
myy BINARY_INTEGER := 2;
begin
mynum := fngreater(myx, myy);
dbms_output.put_line('my num is ' || mynum );
end;
/
Received on Fri Feb 12 1999 - 17:31:18 CST