Re: Calling C Progs in Oracle 7
Date: Tue, 12 Apr 1994 19:07:06 GMT
Message-ID: <Co5uFu.8wH_at_nl.oracle.com>
In <Co3szC.AFo_at_amiserv.chi.il.us> billf_at_amiserv.xnet.com (Bill Froelich) writes:
>Is it possible to call a C program from within a stored procedure
>or trigger in Oracle 7?
Database pipes is the mechanism to use to implement this:
Define a database pipe (see appendix A of the Application Developers guide). The PL/SQL code puts a message in the pipe (this replaces the function-call interface). The C program reads messages from the pipe. The parameters of your function call are 'packed' in the message.
If you need to return a value to the calling PL/SQL procedure or trigger, define another pipe in which the C program places it's return value. In this case, after sending a message to the C program, the PL/SQL code waits for a return message in its pipe.
>Code fragments would be great! but not necessary.
There is an example on page A-23 of the manual mentioned above.
Michael Magan Received on Tue Apr 12 1994 - 21:07:06 CEST