Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: External routine call from PL/SQL
As stated above...in Oracle 8 onwards dll's can be called using external
procedures..
However, in my experience, they MUST be compiled as C code..... not even C++ works....
Cheers
Steve Bright
steve.bright_at_capgemini.co.uk
C. wrote in message <3775ACF3.470918EA_at_rationalconcepts.com>...
>Yes, it's possible but I think it's expecting the dll in C or C++.
>
>So, here goes:
>-- Step 1. Create the library that represents the dll in the database.
>-- the d:... represents the path to the dll (or .so) that is on your
>database server or
>-- some mounted (cross mounted) directory visible to the db server.
>create or replace library x as 'd:\orant\extproc\x.dll';
>/
>grant executeon x to public;
>-- Step 2. Register the dll Note: the param list is the list of params
>that your
>-- external library routine is expecting.
>create or replace procedure xrunner (
> param1 IN OUT VARCHAR2,
> .
> .
> .
> ) AS
> EXTERNAL LIBRARY x
> NAME "xrunner";
>/
>grant execute on xrunner to public;
>
>-- Step 3. Your stored procedure that will call the xrunner proc.
>create or replace test ( param1, param2, param3) AS
> v_param1 VARCHAR2(40) := param1;
> v_param2 ...;
> v_param3 ...;
>BEGIN
> xrunner(v_param1...);
>END;
>/
>grant execute on test to public;
>commit;
>
>Hope that helps.
>Cindy
>
>Gennady wrote:
>
>> Hello,
>> Is it possible to create stored procedure in PL/SQL
>> which calls an external executable or DLL routine written
>> in Visual Basic?
>> Please, if it is possible, give me an example.
>> Thanks,
>> Gennady
>
>
Received on Mon Jun 28 1999 - 02:34:03 CDT