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

Home -> Community -> Usenet -> c.d.o.misc -> Re: call extern C function from PL/SQL

Re: call extern C function from PL/SQL

From: REM <ilica.brnadic_at_zg.hinet.hr>
Date: Tue, 25 Jun 2002 00:57:57 +0200
Message-ID: <af885j$fkpa$1@as201.hinet.hr>


Hello, I'm having problem with calling extern C routin. As you see I'm loading extern C routin, publishing it, but I don't know how call Plzbroj_func function!!!

SQL> CREATE OR REPLACE LIBRARY C_utils AS 'G:\users\ibrnadic\Extern_Rutins_to_Oracle\Debug';   2 /

Library created.

SQL> CREATE OR REPLACE FUNCTION Plzbroj_func (

  2     x     FLOAT,
  3     y     FLOAT)

  4 RETURN FLOAT
  5 AS LANGUAGE C
  6     LIBRARY C_utils
  7     NAME "zbroj";

  8 /

Function created.

SQL> DECLARE
  2 g FLOAT;
  3 a FLOAT:=5;
  4 b FLOAT:=10;
  5 BEGIN
  6 dbms_output.put_line('proba');
  7 g:=Plzbroj_func(a, b);
  8 end;
  9 /
DECLARE
*
ERROR at line 1:

ORA-06520: PL/SQL: Error loading external library
ORA-06522: Unable to load DLL
ORA-06512: at "SCOTT.PLZBROJ_FUNC", line 0
ORA-06512: at line 7

With regards,

desparait ilica

"Dale Edgar" <Dale_at_DataBee.com> wrote in message news:3d16fb51.14679407_at_news.btclick.com...
>
> On Sat, 22 Jun 2002 23:45:16 +0200, "REM" <ilica.brnadic_at_zg.hinet.hr>
> wrote:
>
> >I'm know that is posible to load java class to the database but, is't
> >posible call extern C function direct from PL/SQL???
>
> Yes it is - a google search on "extproc" should turn up a lot
> information. Here's an excellent tutorial to get you started:
>
> http://home.clara.net/dwotton/dba/oracle_extn_rtn.htm
>
> Regards
> Dale
> ----------------------
> Need instant schema documentation? Check out the DDL to HTML generator
> in the free DataBee DBATool. http://www.DataBee.com/dt_home.htm
Received on Mon Jun 24 2002 - 17:57:57 CDT

Original text of this message

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