Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Oracle 8.0.4 external procedure error

Oracle 8.0.4 external procedure error

From: Yuah-yuan Chin <ytchin_at_lucent.com>
Date: Fri, 12 Feb 1999 17:31:18 -0600
Message-ID: <36C4B9C6.C5EB5D83@lucent.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US