Re: info between a form and C via trigger?

From: Alvin Law <alaw_at_oracle.com>
Date: 4 Jan 95 00:43:51
Message-ID: <ALAW.95Jan4004351_at_ap226sun.oracle.com>


In article <789164250snz_at_jlcomp.demon.co.uk> Jonathan_at_jlcomp.demon.co.uk (Jonathan Lewis) writes:
> In article <3e9g50$fsv_at_source.asset.com> karnesj@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.

Another simpler approach would be to wrap the C function around an user-exit callable from the form.

--
      ___
     (o o)
+-oo0-\_/-0oo---------------------------------------------------------------+
| Alvin Law .. Project Leader, Applications Division ... Oracle Corporation |
|  Email: alaw_at_us.oracle.com ..... Voice: 415.506.8317 . Fax: 415.506.7299  |
+---------------------------------------------------------------------------+

ORA-03113: end-of-file on communication channel
Received on Wed Jan 04 1995 - 00:43:51 CET

Original text of this message