Re: info between a form and C via trigger?

From: Jonathan Lewis <Jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 3 Jan 1995 20:17:30 +0000
Message-ID: <789164250snz_at_jlcomp.demon.co.uk>


In article <3e9g50$fsv_at_source.asset.com>

           karnesj_at_source.asset.com "John A. Karnes" writes:

: I have a question regarding the passing of information between
: a SQL*Forms 3.0 form and a C function.
:
: Say I had a C executable that when given a dollar amount,
: returns the appropriate sales tax for that amount. Would it be
: possible to have a field in my form for base price, and when an amount
: is entered in that field, the value is passed to my C executable, and
: the return value is inserted into another field in the same form?
:
: I would greatly appreciate examples or references to locations
: where I can find examples. Thank you for your time.
:
:

If running Oracle 7, use PIPES

The C executable sits in a loop, reading from a named pipe. If there is nothing in the pipe, the process waits without wasting CPU. The form knows the name of the pipe, and when it wants the calculation done writes to that pipe:

    A pipename that will be unique to that instance of the form     The dollar amount
    It then (waits to) read the answer from the pipe that it has     just told the C program to use.

When the C program receives something down the pipe, it does the calculation and writes the result into the pipe that it has just been told about.

See: $ORACLE_HOME/rdbms/admin/dbmspipe.sql for more details.  

-- 
Jonathan Lewis
Received on Tue Jan 03 1995 - 21:17:30 CET

Original text of this message