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 -> Help with External Procedures

Help with External Procedures

From: Andrew Tacchi <andrew.tacchi_at_capgemini.co.uk>
Date: Mon, 25 Jan 1999 16:57:18 -0000
Message-ID: <78i87a$v2h$2@hagen.cloud9.co.uk>


Hi,

I am having problems trying to run a simple external procedure as I need to run stuff on the server that is not possible within PLSQL alone.

For testing I have made a simple DLL that I know works.

#define DllExport __declspec( dllexport )

DllExport int Test()
{
 return 12;
}

Then in Oracle done the following,

SQL> create or replace library planet_utils as 'c:\winnt\pldll.dll'   2 ;
  3 /

Library created.

SQL> CREATE OR REPLACE FUNCTION Test RETURN BINARY_INTEGER AS EXTERNAL   2 LIBRARY planet_utils
  3 NAME "Test"
  4 LANGUAGE C;
  5 /

Function created.

SQL> create or replace procedure test_dll as   2 l_count binary_integer;
  3 begin
  4 l_count := Test;
  5 end;
  6 /

Procedure created.

SQL> exec test_dll
begin test_dll; end;

*
ERROR at line 1:

ORA-06521: PL/SQL: Error mapping function
ORA-06522: Unable to load symbol from DLL
ORA-06512: at "TACCHI.TEST", line 0
ORA-06512: at "TACCHI.TEST_DLL", line 4
ORA-06512: at line 1

Any ideas ore solutions?

Cheers

Andrew Tacchi Received on Mon Jan 25 1999 - 10:57:18 CST

Original text of this message

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