Re: Executing Stored Procedures from end-user tools

From: Grant Johnson <445362_at_aisserver2.llnl.gov>
Date: 13 Apr 94 13:33:17
Message-ID: <445362.94Apr13133317_at_aisserver2.llnl.gov>


In article <2of882$ec7_at_mailhost.interaccess.com> dmausner_at_interaccess.com (Dave Mausner) writes:

   Recently, Steve Stansfield posted:
: However, I haven't had any luck executing this procedure from an end-user tool
: such as Q+E 5.0 or Microsoft Query. I get an invalid SQL
: statement.
: Is there a trick in executing an Oracle stored procedure from a external
: application????

   unfortunately the trick is that the end-user tool has to understand pl/sql    syntax, and that limits your choices largely to products offered by    oracle. it is possible to write your own interface which is oracle-aware    and compatible with a gui toolkit.

   sybase tools work because sybase has its own stored procedure language,    hence also a procedure call capability.    --
   Dave Mausner / Sr Consultant / Braun Technology Group / Chicago, IL USA    No opinions have been expressed. Motto: "Show me the code"

While not particularly elegant (how many work-arounds are?), I have thought about doing this:

	Create dummy table, with one column, action.
	Create a trigger on the table (insert or update).
	Have the trigger check the value of action and then invoke the
          appropriate db-procedure.

So in practice, from the client tool you would issue:

update proxy_proc
set action='REDUCE_DEBT';

Which would fire the on-update trigger:

BEGIN
  IF :NEW.ACTION='REDUCE_DEBT' THEN
    REDUCE_SPENDING;
  END IF;
END; One footnote, I haven't had a chance to try this... But it should work.

Grant Johnson                                 Internet: grantj_at_llnl.gov
Lawrence Livermore National Lab	           PacBell Net: (510) 423-0406
Received on Wed Apr 13 1994 - 13:33:17 CEST

Original text of this message