Click to See Complete Forum and Search --> : ORACLE and DLL calls


Kajko
May 5th, 1999, 12:37 PM
Did anyone know how to call DLL FROM ORACLE ?

Chris Wheeler
May 5th, 1999, 01:29 PM
There are several steps. I would recommend the book Oracle8: PL/SQL Programming by Scott Urman from Oracle Press. It has a good chapter dedicated to External Procedures (which is what Oracle would call a DLL). I'm not sure of all the steps, but here's an overview:
1) Use the CREATE LIBRARY command to create the data dictionary item for the DLL (ex. testlibrary)
2) Create a wrapper procedure to map the PL/SQL calls to the C library functions
CREATE OR REPLACE PROCEDURE TestFunction(
p_Test1 IN VARCHAR2,
p_Test2 IN VARCHAR2) AS EXTERNAL

LIBRARY testlibrary -- Name of example library created in step 1
NAME "TestCFunction" -- Name of C Function
PARAMETERS (p_Test1 STRING, -- Parameters that C Function accepts
p_Test2 STRING);



3) Use the name "TestFunction" (the name of the wrapper in step 2) to call the procedure from a PL/SQL block.

This is very abbreviated. There are some other concerns to take into account which is why I recommended the book. Enjoy and I'll try to answer any more questions you have about this.

Chris R. Wheeler, MCP
Pensacola Christian College
Desktop Programmer
cwheeler@pcci.edu

January 3rd, 2000, 08:03 AM
Hai,
How to create an Oracle DSN dynamically from MFC? I can able to create Ms-Access,Ms-excel etc., DSNs dynamically
using SQLConfigDatasource function. But when i am creating Oracle DSN, Its not adding service name, User id in DSN
details. So help me for the same.

Thanking you
Srinivas

my Email: srinu_bns@usa.net