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 -> Re: Having A Stored Procedure Call A C Program In UNIX

Re: Having A Stored Procedure Call A C Program In UNIX

From: Dave O'Keeffe <DOKeeffe_at_n0spam.cableinet.co.uk>
Date: Tue, 28 Apr 1998 19:35:51 +0100
Message-ID: <35462187.1AC1@n0spam.cableinet.co.uk>


The quick and dirty solution is to create a table to hold a flag in it. You only need a single column, say a VARCHAR2 to keep life simple. You set it to UNFINISHED, then COMMIT it before calling your C program. Then hang in a loop until it is set to FINISHED by the C program (which must also COMMIT). (You may want a timed method of getting out of the loop in case, heaven forbid, the C program crashes!).

There must be a dozen better ways of doing this, but if you can afford the COMMITs this is pretty bulletproof (and portable).

Dave O'Keeffe

Rona Crystal wrote:
>
> I am writing a stored procedure that must call a C program. I will be
> passing one or two variables. I need to wait for the C program to finish. I
> know there is a way to do this but I can't find it in the documentation, at
> least not in any manual that I could think of looking in. I thought it was
> called a user exit. Can anybody point me in the right direction.
>
> Thanks,
> Rona Crystal
> --
> =====================================================================
> Note: My email address has been modified to discourage unsolicited
> commercial and offensive email that is sent by bulk mailers. To
> respond personally to this post, remove all strings beginning and
> ending with #. i.e. j#xx#doe_at_my#yy#comp.com becomes jdoe_at_mycomp.com
> ---------------------------------------------------------------------
> All opinions expressed here are mine alone and do not reflect
> the opinion of any other individual or organization.
> =====================================================================

--
For email replys remove "n0spam." from the above address Received on Tue Apr 28 1998 - 13:35:51 CDT

Original text of this message

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