Here is an external procedure I call from within pl/sql.

This is for unix so I create a .so file and mapped it with the library.  In
Windows NT, you would create a .dll and map it the same way in oracle with
the library.

-- ************* START OF FUNCTION F_CHECK_FAQ ************************
-- This procedure references an IN variable for the external C function
-- RetrieveURL and maps the library in the database which points to
-- the C external procedure to be run.  This external function will
-- return an integer value for the request time (positive number) or
-- an error code (negative number).
-- *************

FUNCTION f_check_faq
(RetrieveURL    IN VARCHAR2,
timeout         IN BINARY_INTEGER)
RETURN BINARY_INTEGER
AS
LANGUAGE C
NAME "rnt_url"
LIBRARY MY_C_LIB
PARAMETERS (
RetrieveURL     string,
timeout         int);

HTH

ReedK
devoted Vikings Fan

-----Original Message-----
Sent: Thursday, August 30, 2001 3:25 AM
To: Multiple recipients of list ORACLE-L


please anyone tell me how to call external procedures(C) from plsql with an
example. 


> -----Original Message-----
> From: Ramesh_Kota [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, August 30, 2001 10:20 AM
> To:   Multiple recipients of list ORACLE-L
> Subject:      Clarification on External procedure in Oracle 8.1.6
> 
> Hi all... 
> 
>         I believe any of u Would be of GREAT help... 
> 
> I have been trying Calling C functions from pl/sql using Oracle 8i's
> External Routine. It works. But when I try to call the Pro*C function
> after precompiling it .. it is failing at connect itself. I have used 
> 
> EXEC SQL Connect username identified by passwd; 
> 
>         The same Pro*c WORKS FINE when I try it from the command line. 
> 
>         Have any of u tried calling Pro*C from Pl/sql. If YES. could u ..
> Send me an example or some resource from wherein I can proceed with my
> work.
> 
> 
> Thanx a lot in advance 
> 
> Ramesh. 
> 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Nirmal Kumar  Muthu Kumaran
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Kempf, Reed
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to