| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I link a c-program to oracle8?§
Fredde wrote:
>
> Hi,
>
> How do I link a program written in c to a procedure or function in PS-SQL
> / Oracle8?
>
> / Fredrik Antonsson Ronneby, Sweden
In order to call an external procedure from a stored procedure you need:
3)Registering the external procedure:
Before you can call the external procedure, you must register it.
That means, you must tell PL/SQL where to find the procedure, how
to call
it and what to pass it, using the following syntax:
CREATE FUNCTION Function_Name(
Input_1 IN CHAR,
Input_2 IN CHAR)
RETURN BINARY_INTEGER AS EXTERNAL
LIBRARY library_name
NAME DLL_Name(shared object name)
LANGUAGE C;
Now you are able to call the external procedure 'Function_Name'
from a
PL/SQL block using the following example:
DECLARE
Input_1 VARCHAR2(32);
Input_2 VARCHAR2(32);
rc BINARY_INTEGER;
BEGIN
Input_1 := 'Test_1';
Input_2 := 'Test_2';
rc := Function_Name(Input_1, Input_2);
END;
For further information see PL/SQL User's Guide and Reference, paragraph 'External Procedure'.
Hope this help
Ciao Gennaro
--
"Buongiorno signor De Filippo, qui e' la Televisione". "Va bene, aspetti
che le passo il frigorifero" disse Eduardo De Filippo.
Received on Thu May 06 1999 - 03:33:00 CDT
![]() |
![]() |