Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Pro*C and trigger

Re: Pro*C and trigger

From: Matthias Rogel <rogel_at_web.de>
Date: Tue, 10 Dec 2002 07:31:35 +0100
Message-ID: <at41o7$vlnak$1@ID-86071.news.dfncis.de>


damorgan wrote:
> lomba wrote:
>
>

>>"damorgan" <damorgan_at_exesolutions.com> a écrit dans le message de news:
>>3DF4CE4B.CDB2956D_at_exesolutions.com...
>>
>>
>>>Have you carefully thought out what you are doing and the implications
>>>thereof?
>>
>>Absolutely not :(
>>
>>The problem is that I have an application to start which has to initialize
>>my database, supposing I never accessed to this db before. You see an other
>>solution to "insert" this trigger ?
>>
>>--
>>lomba

>
>
> Triggers are not something that should be built on-the-fly. The solution is to
> build the trigger in the database as part of a set-up routine.
>
> What you are doing is a recipe for disaster unless the C program to which you
> alude is a set-up program.
>
> Dan Morgan
>

Dan:
great remark
but, as far as I understand lomba, the program he wants to write is also a set-up program
Do U have a hint for him in this case ? No :-(

lomba:
you could try with the Pro*C construct EXECUTE IMMEDIATE (note there is also an execute immediate construct in PL/SQL, but I don't speak of this now)

the Syntax is something like

      EXEC SQL EXECUTE IMMEDIATE :statement ;
      where statement is a character string host variable.
(take a look at your Pro*C programmers guide)

Does this work ?

Good luck,

Matthias Received on Tue Dec 10 2002 - 00:31:35 CST

Original text of this message

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