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 -> Re: C++ function i a stored procedure

Re: C++ function i a stored procedure

From: John F. Keaveney <johnkeaveney_at_targusinfo.com>
Date: Fri, 18 Sep 1998 15:41:39 -0700
Message-ID: <6tunfo$3rs$1@news1-alterdial.uu.net>


Yes,

    wrap your functions in a C API and you can call them by creating a library as show below. Then you can call

    variable := MyPackage.f1('test')

etc...

    Good luck,
    John

--

prompt Creating Library...

create or replace library MyLib as 'MyLib.dll' ;

/
show err
/

prompt Declaring Package MyPackage...

create or replace package MyPackage as

function f1( p1 string ) return string ;

pragma restrict_references( f1, wnds, rnds, wnps, rnps ) ;

function f2( p1 string ) return number ;

pragma restrict_references( f2, wnds, rnds, wnps, rnps ) ;

end;

/
show err
/

prompt Creating Package MyPackage...

create or replace package body MyPackage as

function f1( p1 string ) return string is

 external library MyLib

 name "f1"

 language C

 parameters ( p1 string ) ;

function f2( p1 string ) return number is

 external library MyLib

 name "f2"

 language C

 parameters ( p1 string ) ;

end MyPackage;

/
show err
/

Nicolas Bronke wrote in message <6ttvht$3ch$1_at_news01.btx.dtag.de>...
>Does exist a possibility to use DLL-Functions (programmed in C++ or Delphi)
>in Stored Procedures and Funtions?
>
>Kind regards
>Nicolas
>
>
Received on Fri Sep 18 1998 - 17:41:39 CDT

Original text of this message

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